function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ 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.