I am trying to execute a Batch job that is processing around 2 million contacts, I batch Apex whenever I try to execute is throwing an error
First error: SQLException [common.exception.SfdcSqlException: ORA-01013: user requested cancel of current operation
select /*ApexBatch.Class.BatchProcessMerge.start: line 144*/ *
from (select "Id"
from (select /*+ ordered use_nl(t) index(t pkcontact)...
I have changed my query in different ways by adding various Where conditions but still getting the error.
The Query I am using is
Select Id , LastModifiedDate, PIV_Last_Updated_Date__c, Email,EmailAlt__c,LastName,Birthdate from Contact where LastName != 'Unknown' AND Name LIKE 'a%' order by Email,LastName,Birthdate,LastModifiedDate,PIV_Last_Updated_Date__c
I was actually using null comparison but was told by support that its not recommended, so I remove the nulls from where clause. Still having the same issue.
Select Id , name, LastModifiedDate, PIV_Last_Updated_Date__c, Email,EmailAlt__c,LastName,Birthdate from Contact where Name LIKE 'a%' and Email != null and LastName != null and LastName != 'Unknown' and Birthdate != null order by Email,LastName,Birthdate,LastModifiedDate,PIV_Last_Updated_Date__c