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

Perf : merge consecutive calls to $match

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

      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@mongodb.com Mathias Stearn
            Reporter:
            yamo Yann Moisan
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated:
              Resolved: