+ Start a Discussion
Lee SinLee Sin 

How is the scope split to batches?

I want to order the result of a query and process the result following the order. So I can control the heap size.
If my query is   "select id,Accountid,email from Contact order by Accountid",
When the system split the query result to batches, are the batches split in order or randomly?


 
Hargobind_SinghHargobind_Singh
I think this should split in order and not randomly. though processing of batches might not be sequential, as they might get queued.