I'm trying to use the Query Plan tool in the developer console for the first time.
Every single query that I try ends up with a table scan, because of the IsDeleted field not being indexed. The notes always have this for every table in the query:
Not considering filter for optimization because unindexed.
Table: Opportunity Fields: ["IsDeleted"]
Even if the query is as basic as:
select Id from Opportunity
where id = 'xxxxxxxxxxxxxxx'
And with queries with joins you end up with things like:
Is this normal ?
Best Answer
It only uses the lowest cost plan. Anything below that is irrelevant and can be safely ignored. So since your
Index
query has aCost
of 0.00001, that's what the Query Optimizer will use at run time.Note from Query Plan Tool (How To & FAQ):