Perf : merge consecutive calls to $match

XMLWordPrintableJSON

    • Type: Improvement
    • Resolution: Done
    • Priority: Major - P3
    • 2.5.4
    • Affects Version/s: None
    • Component/s: Aggregation Framework
    • None
    • Fully Compatible
    • None
    • 3
    • None
    • None
    • None
    • None
    • None
    • None
    • None

      I have an index on a and b :

      {"a":1, "b":1}

      If I use two consecutive $match'es in the pipeline, the index is used but only for the "a" part.
      {$match:{"a":xxx}}, {$match:{"b":xxx}}

      The server could optimize this case by internally merge the two match.

              Assignee:
              Mathias Stearn
              Reporter:
              Yann Moisan
              Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

                Created:
                Updated:
                Resolved: