Details
-
Improvement
-
Resolution: Unresolved
-
Major - P3
-
None
-
None
-
Query Execution
Description
The basic idea is that if the doc is
{ a:0 }and the query is
{ a:1, $where:... }then we should reject on the basis of 'a' before evaluating the $where clause (slow).
In the old Matcher, $and checks:
- simple operators eg equality, $gt, $in
- then regular expressions
- then nested compound expressions (nested $and, $or, etc)
- then $where
We can change the heuristics in the new implementation, but they should stay at least as good as the old ones.