When querying records by lookup object's indexed field, the Query Plan shows something like this:
The Query Plan tool will show a list of available plans that our Query Optimizer can utilize for the query provided and will be arranged by cost ascending. (...) The plan with the lowest cost is the plan that is used for driving the query execution.
Does it mean that always only the single row with the lowest cost will be used, or is it more like 'the plan with the lowest cost for each sObject is used'? In other words, will the cost here be 0, or 0 (lowest Account cost) + 2.83 (lowest Contact cost)?
I suppose the former (well, not really 0, seems like a bug), as there's no need to perform full scan when Contacts are indexed by AccountId an thus it should be more like O(log(n)) complexity.