Explain bulkification and why a single-record trigger pattern fails at scale
Real World Scenario
A data loader job inserting 10,000 Accounts fires a trigger that queries Contacts inside a for-loop. The job fails at record 150 with "Too many SOQL queries".
Expected Answer
Follow-Up Questions & Answers
Click to expand — each follow-up includes a direct, interview-ready answer
Main difference: use case and scale. Triggers receive up to 200 records per batch—code must handle collections, not assume single record. Never SOQL or DML inside loops over trigger.new or trigger.old. Pick based on your integration pattern and team capability. Bulkification is non-negotiable—architects reject code reviews with loop queries regardless of current data volume. Balance speed of delivery with maintainability.
Architect Perspective
Bulkification is non-negotiable—architects reject code reviews with loop queries regardless of current data volume.