-
Type: Improvement
-
Resolution: Unresolved
-
Priority: Major - P3
-
None
-
Affects Version/s: None
-
Component/s: Internal Code, Querying
-
Query Optimization
Right now a leaf node will have the "local" path, but not the full context. For example, in both of the following queries there will be an equality node with the path "foo":
{foo: 4} {a: {$elemMatch: {foo: 4}}
In the second query, the full path for that equality is really "a.foo". As a result, a lot of planning logic has to manually keep track of the full path to accomodate this. For example this logic in QueryPlannerIXSelect::getFields()