-
Type: Improvement
-
Resolution: Fixed
-
Priority: Major - P3
-
Affects Version/s: None
-
Component/s: Aggregation Framework, Diagnostics
-
Minor Change
-
Query 2020-11-30, Query 2020-12-14
SERVER-21784 recently added execution stats to the agg execution layer, and exposed them via "executionStats" or "allPlansExecution" explain verbosities. This ticket, however, added only nReturned and executionTimeMillis for every stage. There are more stats that we can expose which will be useful for debugging and performance investigations.
One suggestion from alex.bevilacqua is to expose the amount of data processed by $sort or $group. We have such stats for sorts executed in the PlanStage layer, but not for sorts executed in the DocumentSource layer. The $sort stage would report a totalDataSizeSortedBytesEstimate metric, and the $group stage would report totalOutputDataSizeBytes.
Another idea that we could consider implementing at the same time is to report usedDisk:true when either a $sort or a $group spills to disk at runtime.
- is related to
-
SERVER-53461 totalDataSizeGroupedBytesEstimate stats for $group should report total bytes processed
- Closed
-
SERVER-21784 Track 'nReturned' and 'executionTimeMillis' execution stats for each aggregation pipeline stage and expose via explain
- Closed
-
SERVER-48378 Expose settings of query knobs in agg explain output
- Closed
- related to
-
SERVER-49027 Extend $group explain execution stats to report memory consumption per accumulator
- Closed
-
SERVER-53303 Make sort and group execution stages report number of spills to disk in explain
- Closed