You need to sign in to do that
Don't have an account?
jagadeesh chandu 3
How to fetch more than 50 million records using database querylocator in batch apex?
what happens if it fails?
function readOnly(count){ }
You need to sign in to do that
Don't have an account?
String query1 = 'select id from account where recordCount__c <= :5000000';
String query2 = 'select id from account where recordCount__c > :500000' and <= :1000000';
then use query1 and query2 with queryLocator. Note that recordCount__c is a custom field that you can auto-populate using a trigger or workflow.
Regards,
Anup