[SalesForce] How is the batch size been decided

I have a Batch job with limit 20000 records in the Start method.
And while executing I have put batch size to 900,

according to the documentation i should get Total No Records/Batch size
this will result to 22.2 and making it to round off to 23.
But in my case I am getting 30,32,27 batchs processed in total.

enter image description here

Best Answer

You can set a custom batch size (up to 2000 records) by providing a QueryOptions header. But if a SOQL statement selects two or more fields of type long text, the batch size will never be more than 200 records.

So I think in above case it takes 200 as batch size and total batch executed (30+30+30+10)

Related Topic