Details
-
Improvement
-
Resolution: Unresolved
-
Major - P3
-
None
-
None
-
None
-
Query Optimization
Description
Something that looks like this:
{$match:{}},
|
{$project:{}},
|
{$lookup:{}},
|
{$addFields:{}},
|
{$lookup:{}},
|
{$count:"c"}
|
is basically a $match followed by a $count. It would be nice if aggregation had a way of figuring that out.
Attachments
Issue Links
- is related to
-
SERVER-73027 [CQF] Test that we eliminate $addFields, $project before $count
-
- Closed
-
-
SERVER-13703 Presence of extraneous $project causes a less efficient plan to be used
-
- Backlog
-