-
Type:
Improvement
-
Resolution: Unresolved
-
Priority:
Major - P3
-
None
-
Affects Version/s: None
-
Component/s: None
-
DB Integration & Observability
-
None
-
None
-
None
-
None
-
None
-
None
-
None
The $queryStats execution stage materializes every field in the query stats entry. The stage could internalize a $project and just skip over fields that the project field will remove. This could be modeled like $_internalUnpackBucket which uses an include/exclude field to internalize the projection.
This is related to the $queryStats top-k sort optimization (SERVER-129387), which works with a $queryStats followed by a $project, but should be considered a separate optimization.
- is related to
-
SERVER-129387 Optimize $queryStats for top-k metrics.workingTimeMillis.sum sort + limit pattern
-
- Closed
-