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

Perf : merge consecutive calls to $match

    XMLWordPrintableJSON

Details

    • Icon: Improvement Improvement
    • Resolution: Done
    • Icon: Major - P3 Major - P3
    • 2.5.4
    • None
    • Aggregation Framework
    • None
    • Fully Compatible

    Description

      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.

      Attachments

        Activity

          People

            mathias@mongodb.com Mathias Stearn
            yamo Yann Moisan
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: