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

combined $match and $project stages

    XMLWordPrintableJSON

Details

    • Icon: New Feature New Feature
    • Resolution: Incomplete
    • Icon: Major - P3 Major - P3
    • None
    • None
    • None
    • Mongo DB version 4.0.10

    Description

      We ran into an aggregation pipeline optimization problem. We have a $match stage and a $group stage. The $match stage uses an index and its optimal, it returns approx. 32k (avg. size 1.7KB) documents. The fetch takes long 400-500 ms from total runtime of 500-600ms , wouldn't it be possible to merge a $match and $project stage so we could filter unnecessary fields for the $group stage. We experimented with the regular find method and we saw a significant benefit for the fetch with projecting.

      Attachments

        Activity

          People

            daniel.hatcher@mongodb.com Danny Hatcher (Inactive)
            mitereiter@gmail.com Mitereiter Balazs Zoltan
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: