Details
-
Improvement
-
Resolution: Unresolved
-
Major - P3
-
None
-
None
-
Query Optimization
Description
If I have a pipeline
{$group:{_id:"any", a:{$push:"$x"}}}, {$project:{a:{$slice:["$a",0,5]}}}
|
We can pull in knowledge that only first 5 elements are needed from "a" in $group and stop pushing more elements after we have that many.