-
Type: Improvement
-
Resolution: Unresolved
-
Priority: Major - P3
-
None
-
Affects Version/s: None
-
Component/s: None
-
None
-
Query Optimization
We reorder MatchExpression predicates according to the MatchExpression::MatchType enum during canonicalization. This is used to put the most selective predicates first, so less overall work is done during evaluation.
Above this enum, we should make it clear that the enum order matters for reordering predicates. We should also reevaluate this order, since there are some anomalies such as INTERNAL_EXPR_EQ not being next to EQ, or MATCH_IN being sorted after inequalities.