Skip to main content

SF-0373 · Concept · Medium

What is the batch size if we don't use optional scope parameters?

✓ Verified by Vikas Singhal · Last reviewed 5/17/2026 · Updated for Spring '26

200 records. That’s the default chunk size when you call Database.executeBatch(new MyBatch()) without the second argument.

Database.executeBatch(new MyBatch());            // chunks of 200
Database.executeBatch(new MyBatch(), 200);       // identical
Database.executeBatch(new MyBatch(), 50);        // chunks of 50

Why 200?

200 is also the trigger context size — when a trigger fires for a DML on 500 records, it runs three times, with 200 + 200 + 100 records each. Batch Apex matches that default so:

  • If you copy logic from a trigger into a batch’s execute, it works the same way without surprise governor limit changes.
  • Code tested at trigger-size scales also works in batch.

What 200 means for limits

Each execute runs in its own transaction with these per-transaction limits:

LimitValue (async)
SOQL queries100
Rows retrieved by SOQL50,000
DML statements150
DML rows10,000
CPU time60,000 ms
Heap12 MB
Callouts100

200 records is comfortably within these limits as long as your code is bulkified — i.e., one SOQL for the whole scope, one DML for the whole scope, not per record.

When 200 is too big

ScenarioWhat to do
Each record triggers a calloutDrop to 25–50 (100-callouts-per-transaction limit)
Each record causes a 5+ trigger cascade on related recordsDrop to 50 or 25
Each record needs heavy CPU computationTry 50; tune from there
You hit Apex CPU time limit exceededHalve the size, retest

When 200 is too small

ScenarioWhat to do
Pure field update, no triggers, no relationsTry 1,000
Mass delete of cold recordsTry 500–2,000
Job takes too long (too many chunks)Bigger scope = fewer transactions = less overall time

Practical recommendation

Start at 200. If anything fails — drop it. If everything’s fast and clean and you want to compress runtime — raise it. Don’t tune blindly; measure with actual data volume.

Common interview follow-ups

  • Can I change scope mid-job? — No, fixed at executeBatch time.
  • Is the chunk size visible to execute? — Yes, just count scope.size().
  • Does Iterable start use the same default? — Yes, 200.

Verified against: Apex Developer Guide — Using Batch Apex. Last reviewed 2026-05-17.