You need to sign in to do that
Don't have an account?
Megha Mittal 19
What is the way the batches are divided in a nested child relationship query
I want to know how the batches will be divided in a relationship query from querylocator.
So if I have a batch size of 50, will it send to the execute method in batches of 50 for parent object + the child objects for these 50 parents
Or
It will be a total of 50 from both queries.
So if I have a batch size of 50, will it send to the execute method in batches of 50 for parent object + the child objects for these 50 parents
Or
It will be a total of 50 from both queries.
All Answers
The minimum size for Batch Apex is 1.
The maximum size for Batch Apex is 2000.
The default is 200.
Hope this helps you!
Please mark it as solved, If this reply was helpful.
Thanks,
Rakesh
I am aware of this information. I wanted to know how will the batch size work when the query is relationship like
database.getquerylocator(select id,name ,(select name,id from contacts) from account)
Considering I have set the batch size as 50
In this how will the batch size work,
Will it be like 50 records from account object + child records of this 50 accounts
or
50 records from account + contact combined.
Thanks.