Checklist template
Review SOQL before it ships
Privacy: check first. Check your company's policy and your account settings, and take out details the task doesn't need.
Paste this
Object(s): [OBJECT/CONTEXT]
Where this runs: [WHERE THIS RUNS: trigger, Flow, batch class, report]
Approximate record volume: [APPROX RECORD VOLUME]
The query:
[THE QUERY]
Review this SOQL query for:
1. Selectivity: does the WHERE clause use an indexed or otherwise
selective field, or would this require a full table scan at scale?
2. Governor limit risk: could this run more than once per transaction?
3. Bulk safety: does it handle zero results and multiple records
correctly?
4. Clarity: could someone unfamiliar with this object read the WHERE
clause and understand what it's selecting for?
For each, say pass, risk, or fail, with the specific line and why.
Don't suggest a rewrite yet, findings only. Want the walkthrough? See the full guide →
Related templates
- Document a validation rule A plain-language purpose, trigger condition, business impact, and maintenance note.
- Explain CPQ logic to a nontechnical stakeholder A plain-language explanation of pricing logic, conditions, outcomes, and caveats.