It worked fine… until the volume grew
A Scheduled Script that processes everything in one run is fine with a few records. When volume grows, the trouble starts.
Scheduled Script
- A single run, capped at 10,000 governance units.
- If it runs out of units, it stops halfway.
Map/Reduce
- Works in stages:
getInputData,map,reduceandsummarize. - Processes one record at a time: one error doesn’t stop the rest.
- In
summarizeyou review what failed and why.
Rule of thumb: Scheduled for short jobs with predictable volume. Map/Reduce for many records or growing volume. When in doubt, start with Map/Reduce.