6

Some SOQL starts batch job with 'where' clause. This batch job is running several minutes/hours and some records from original set change state and don't satisfy original SOQL 'where' conditions. How does the job behave in such scenario? Does original result set cached or system run soql each time to get 200 records so changed record will be excluded and is not processed. Thanks for ideas!

4

The original result set is cached and thus your records have the original state... As explained here http://blogs.developerforce.com/engineering/2013/02/force-com-batch-apex-and-large-data-volumes.html

1) The start method of a batch Apex class collects the records or objects that will be processed.
2) The execute method picks up batches of these records and does the bulk of the processing.

  • 1
    The question is asking which of 2 scenarios is true. You have the correct answer, but saying 'yes this is true' is misleading. You should state which scenario is correct? – Chris Duncombe Oct 8 '13 at 11:48
  • you're right Dunc44, thanx ! edited the answer to be precise – ManSpan Oct 8 '13 at 12:54

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.