Back to daily archive
Development/

Release-ready engineering: Selective SOQL

JSBC Labs retrospective note4 min read

Why this deserves attention

Query design must reflect data distribution and access paths, not only functional correctness. A sound design makes this explicit before implementation begins.

A query that performs well in a small sandbox can become non-selective and exceed limits in production. On 20 June 2026, this archive entry records the principle as a practical design concern rather than a product announcement.

Prepare for platform change

Look at selective soql through how the capability will be tested against seasonal platform change. The objective is not to introduce more process; it is to expose the few decisions that determine reliability, ownership and future change.

Filter on appropriate indexed fields, avoid unbounded result sets and test against realistic volume and skew. Record the decision close to the solution so that delivery, support and future architecture reviews work from the same intent.

What good looks like

Performance remains stable as records and concurrent use increase. The team can describe the expected behaviour, the owner, the evidence of success and the response when reality differs from the design.

A useful next step is to review one live implementation against this principle, identify the largest unowned assumption and turn it into a bounded improvement with a measurable outcome.