Skip to content

Commit 21cfa9e

Browse files
committed
DOCS-5920 additional explain results fields
1 parent 0b00ad4 commit 21cfa9e

File tree

1 file changed

+51
-1
lines changed

1 file changed

+51
-1
lines changed

source/reference/explain-results.txt

Lines changed: 51 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -172,12 +172,17 @@ information:
172172
"stage" : <STAGE1>
173173
"nReturned" : <int>,
174174
"executionTimeMillisEstimate" : <int>,
175+
"works" : <int>,
176+
"advanced" : <int>,
177+
"needTime" : <int>,
178+
"needYield" : <int>,
179+
"isEOF" : <boolean>,
175180
...
176181
"inputStage" : {
177182
"stage" : <STAGE2>,
178183
...
179184
"nReturned" : 0,
180-
"executionTimeMillisEstimate" : 0,
185+
"executionTimeMillisEstimate" : <int>,
181186
...
182187
"inputStage" : {
183188
...
@@ -234,6 +239,51 @@ information:
234239
Each stage consists of execution information specific to the
235240
stage.
236241

242+
.. data:: explain.executionStats.executionStages.works
243+
244+
Specifies the number of "work units" performed by the query
245+
execution stage. Query execution divides its work into small
246+
units. A "work unit" might consist of examining a single index key,
247+
fetching a single document from the collection, applying a
248+
projection to a single document, or doing a piece of internal
249+
bookkeeping.
250+
251+
.. data:: explain.executionStats.executionStages.advanced
252+
253+
The number of intermediate results returned, or *advanced*, by
254+
this stage to its parent stage.
255+
256+
.. data:: explain.executionStats.executionStages.needTime
257+
258+
The number of work cycles that did not advance an intermediate
259+
result to its parent stage (see
260+
:data:`explain.executionStats.executionStages.advanced`). For
261+
instance, an index scan stage may spend a work cycle seeking to a
262+
new position in the index as opposed to returning an index
263+
key; this work cycle would count towards
264+
:data:`explain.executionStats.executionStages.needTime` rather
265+
than :data:`explain.executionStats.executionStages.advanced`.
266+
267+
.. data:: explain.executionStats.executionStages.needYield
268+
269+
The number of times that the storage layer requested that the query
270+
system yield its locks.
271+
272+
.. data:: explain.executionStats.executionStages.isEOF
273+
274+
Specifies whether the execution stage has reached end of stream:
275+
276+
- If ``true`` or ``1``, the execution stage has reached
277+
end-of-stream.
278+
279+
- If ``false`` or ``0``, the stage may still have results to
280+
return. For example, consider a query with a limit whose
281+
execution stages consists of a ``LIMIT`` stage with an
282+
input stage of ``IXSCAN`` for the query. If the query
283+
returns more than the specified limit, the ``LIMIT`` stage
284+
will report ``isEOF: 1``, but its underlying ``IXSCAN`` stage
285+
will report ``isEOF: 0``.
286+
237287
.. data:: explain.executionStats.allPlansExecution
238288

239289
Contains *partial* execution information captured during the

0 commit comments

Comments
 (0)