diff --git a/source/reference/explain-results.txt b/source/reference/explain-results.txt index 1d97a122d2e..72ff9c76833 100644 --- a/source/reference/explain-results.txt +++ b/source/reference/explain-results.txt @@ -775,6 +775,63 @@ details the indexes; e.g.: In previous versions of MongoDB, ``cursor.explain()`` returned the ``clauses`` array that detailed the indexes. +.. _sort-and-group-executionStats-and-above: + +``$sort`` and ``$group`` Stages +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +When ``explain`` is run in either +:ref:`executionStats ` or +:ref:`allPlansExecution ` verbosity +mode, the :pipeline:`$sort` and :pipeline:`$group` stages have +additional output. + +.. list-table:: + :header-rows: 1 + :widths: 20 15 15 50 + + * - Stage + + - Field + + - Type + + - Description + + * - :pipeline:`$sort` + + - ``totalDataSizeSortedBytesEstimate`` + + - long + + - An estimated number of bytes processed in the :pipeline:`$sort` + stage. + + * - :pipeline:`$sort` + + - ``usedDisk`` + + - boolean + + - Whether the :pipeline:`$sort` stage wrote to disk. + + * - :pipeline:`$group` + + - ``totalOutputDataSizeBytes`` + + - long + + - An estimate of the total size of all documents output by the + :pipeline:`$group` stage in bytes. + + * - :pipeline:`$group` + + - ``usedDisk`` + + - boolean + + - Whether the :pipeline:`$group` stage wrote to disk. + .. _explain-output-sort: Sort Stage