combined $match and $project stages

XMLWordPrintableJSON

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

      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:
              Danny Hatcher (Inactive)
              Reporter:
              Mitereiter Balazs Zoltan
              Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

                Created:
                Updated:
                Resolved: