Uploaded image for project: 'Core Server'
  1. Core Server
  2. SERVER-95367

Reevaluate canonical MatchExpression predicate order

    • Type: Icon: Improvement Improvement
    • Resolution: Unresolved
    • Priority: Icon: Major - P3 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. 

            Assignee:
            Unassigned Unassigned
            Reporter:
            matt.boros@mongodb.com Matt Boros
            Votes:
            0 Vote for this issue
            Watchers:
            7 Start watching this issue

              Created:
              Updated: