Making Selective Queries for Performance (in English)
Updated 2026-11-07
What's changed since the video
Each change is dated and checked against Salesforce's own documentation.
- The cases are documented now, and the course quotes them. Salesforce lists when a custom index typically isn't used: a negative operator such as "NOT EQUAL TO (or !=), NOT CONTAINS, and NOT STARTS WITH", CONTAINS, and "comparing with an empty value (Name != '')" (Working with Very Large SOQL Queries, Apex Developer Guide, Winter '27, checked 2026-11-01). Not a platform change.
- Greater-than and less-than on text fields. The video lists these as not selective. That's from experience, and we didn't find it in Salesforce's documentation, so the course teaches only the documented cases. Not a platform change.
- The Query Plan route. To see whether a filter uses the index, the Query Plan is now in Web Console rather than the Developer Console (see the note on STA 2.3).
Still right
- Having an index isn't enough: you have to ask for the data in a way the index can answer. "Starts with" on an indexed field can use the index; "not equal", "not in" and a search for an empty value can't.
- A leading wildcard (`LIKE '%Z%'`) behaves like "contains" and can't use the index the way "starts with" does.
- List views and report filters follow the same rules as SOQL: what you filter on, and how, decides whether they're fast.
All videos in this series: 데이터 아키텍처
동영상은 클릭할 때만 YouTube에서 불러옵니다.