Uploaded image for project: 'Core Server'
  1. Core Server
  2. SERVER-53303

Make sort and group execution stages report number of spills to disk in explain

    XMLWordPrintable

    Details

    • Type: Improvement
    • Status: Closed
    • Priority: Major - P3
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 5.0.0-rc0
    • Component/s: Querying
    • Labels:
      None
    • Backwards Compatibility:
      Fully Compatible
    • Sprint:
      Query Execution 2021-05-03, Query Execution 2021-05-17, Query Execution 2021-05-31

      Description

      Work done under SERVER-51026 recently extended the query execution systems runtime stats to track the individual number of times that a sort stage spills to disk. However, explain currently only reports whether a SORT PlanStage used disk with a boolean; if disk was used, we don't indicate the number of times that we spilled sorted data to disk. We should take advantage of the work done in SERVER-51026 and report this "spills" metric for the SORT stage.

      Additionally, it would be good to report this as a runtime stat for the $sort DocumentSource. We could also make a similar extension and report the number of spills for a $group. This could build on the work done in SERVER-48380 and SERVER-49027 to add additional runtime stats for $sort and $group to agg explain output.

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              denis.grebennicov Denis Grebennicov
              Reporter:
              david.storch David Storch
              Participants:
              Votes:
              1 Vote for this issue
              Watchers:
              7 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved: