You need to sign in to do that
Don't have an account?
Rahul Rana 32
scenarios where we would want to keep the batch size as 1.
Hi Everyone,
I want to know the scenarios where we would want to keep the batch size lowest as poosible, maybe even 1.
Thanks in advance!
I want to know the scenarios where we would want to keep the batch size lowest as poosible, maybe even 1.
Thanks in advance!
Batch Size 1 can be kept under the folllowing conditions:
- When you want to make sure that if the batch fails only those record are failed where this an exception and other should pass. For Eg: If you have batch size as 50, if any one record is failed than all the other 49 in this batch will be failed with same error.
- If you think that updating more records in a single batch can hit a Salesforce limit due to the more number of DMLs or SOQL in the backend so in this case also you need to use a batch with size of 1.
There might be some other conditions as well, but these are the important one's.Thanks,
Abhishek Bansal.