0

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

8
  • Can you share screenshot of execution flow and your batch start block. Commented Oct 1, 2018 at 8:14
  • I have added the image
    – Arvind
    Commented Oct 1, 2018 at 8:52
  • As I can see last 3 counts are 30. Are you sure you are getting 30,32,27. Share the start block code as well. Commented Oct 1, 2018 at 9:35
  • that was the latest. so its 30 30 and 27. it varies a lot. Assume it as a simple query like select id,name from account limit 20000
    – Arvind
    Commented Oct 1, 2018 at 9:44
  • Is there any other user creating/deleting data in the background? Commented Oct 1, 2018 at 9:47

1 Answer 1

1

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)

2
  • No the external system is calculated in such a way that it'll accept only 23 batch records. where as in our case its 30.
    – Arvind
    Commented Oct 1, 2018 at 9:18
  • I thought your case was external one. Commented Oct 1, 2018 at 9:25

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .