Skip to content

Commit e649806

Browse files
jmd-mongojeff-allen-mongo
authored andcommitted
DOCS-14454 expose data size in bytes processed by sort and group in agg execution stats explain
1 parent ab8ab9c commit e649806

File tree

1 file changed

+57
-0
lines changed

1 file changed

+57
-0
lines changed

source/reference/explain-results.txt

Lines changed: 57 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -775,6 +775,63 @@ details the indexes; e.g.:
775775
In previous versions of MongoDB, ``cursor.explain()`` returned the
776776
``clauses`` array that detailed the indexes.
777777

778+
.. _sort-and-group-executionStats-and-above:
779+
780+
``$sort`` and ``$group`` Stages
781+
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
782+
783+
When ``explain`` is run in either
784+
:ref:`executionStats <explain-method-executionStats>` or
785+
:ref:`allPlansExecution <explain-method-allPlansExecution>` verbosity
786+
mode, the :pipeline:`$sort` and :pipeline:`$group` stages have
787+
additional output.
788+
789+
.. list-table::
790+
:header-rows: 1
791+
:widths: 20 15 15 50
792+
793+
* - Stage
794+
795+
- Field
796+
797+
- Type
798+
799+
- Description
800+
801+
* - :pipeline:`$sort`
802+
803+
- ``totalDataSizeSortedBytesEstimate``
804+
805+
- long
806+
807+
- An estimated number of bytes processed in the :pipeline:`$sort`
808+
stage.
809+
810+
* - :pipeline:`$sort`
811+
812+
- ``usedDisk``
813+
814+
- boolean
815+
816+
- Whether the :pipeline:`$sort` stage wrote to disk.
817+
818+
* - :pipeline:`$group`
819+
820+
- ``totalOutputDataSizeBytes``
821+
822+
- long
823+
824+
- An estimate of the total size of all documents output by the
825+
:pipeline:`$group` stage in bytes.
826+
827+
* - :pipeline:`$group`
828+
829+
- ``usedDisk``
830+
831+
- boolean
832+
833+
- Whether the :pipeline:`$group` stage wrote to disk.
834+
778835
.. _explain-output-sort:
779836

780837
Sort Stage

0 commit comments

Comments
 (0)