-
Type: New Feature
-
Resolution: Incomplete
-
Priority: 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.