-
Type: Improvement
-
Resolution: Gone away
-
Priority: Major - P3
-
None
-
Affects Version/s: None
-
Component/s: Querying
-
Query Execution
It would be great if the top-level $and optimization didn't rely on pointer comparison with the root of the MatchExpression tree. Ideally we should do something more principled here that feels less hacky.
Also, there are cases involving nested $and's where we could apply the same optimization that we're doing for the top-level $and. For example, we could optimize the inner $and in queries like "find({$or[{$and: [..]}, ..]})".