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

combined $match and $project stages

    • Type: Icon: New Feature New Feature
    • Resolution: Incomplete
    • Priority: Icon: Major - P3 Major - P3
    • None
    • Affects Version/s: None
    • Component/s: None
    • Environment:
      Mongo DB version 4.0.10

      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.

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

              Created:
              Updated:
              Resolved: