Skip to content

Commit 8d6412f

Browse files
authored
DOCS-16286-explain-executionStats-nReturned-incorrect-desc (#6132) (#6228)
* DOCS-16286-explain-executionStats-nReturned-incorrect-desc * Adding taxonomy tagging, updated duplicate section with new description. * Further clarifying after feedback, removing inaccurate explain.nReturned entry after external review. * Updating Compass procedure. * Removing nReturned from query example due to incorrect location. * Removing redundant taxonomy tags.
1 parent 5ab7335 commit 8d6412f

File tree

2 files changed

+10
-11
lines changed

2 files changed

+10
-11
lines changed

source/reference/explain-results.txt

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -444,7 +444,7 @@ execution of the winning plan. In order to include
444444

445445
.. data:: explain.executionStats.nReturned
446446

447-
Number of documents that match the query condition.
447+
Number of documents returned by the winning query plan.
448448
:data:`~explain.executionStats.nReturned` corresponds to the ``n`` field
449449
returned by ``cursor.explain()`` in earlier versions of MongoDB.
450450

@@ -645,7 +645,6 @@ The following fields are included in the explain results for a
645645
totalKeysExamined: <long>,
646646
collectionScans: <long>,
647647
indexesUsed: [ <string_1>, <string_2>, ..., <string_n> ],
648-
nReturned: <long>,
649648
executionTimeMillisEstimate: <long>
650649

651650
To see the descriptions for the fields in the ``$lookup`` section, see
@@ -673,10 +672,6 @@ The other fields are:
673672

674673
Array of strings with the names of the indexes used by the query.
675674

676-
.. data:: explain.nReturned
677-
678-
Number of documents that match the query condition.
679-
680675
.. data:: explain.executionTimeMillisEstimate
681676

682677
Estimated time in milliseconds for the query execution.

source/tutorial/analyze-query-plan.txt

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,10 @@ Analyze Query Performance
44

55
.. default-domain:: mongodb
66

7+
.. facet::
8+
:name: programming_language
9+
:values: shell
10+
711
.. contents:: On this page
812
:local:
913
:backlinks: none
@@ -137,7 +141,7 @@ Query with No Index
137141

138142
- :data:`executionStats.nReturned
139143
<explain.executionStats.nReturned>` displays ``3`` to
140-
indicate that the query matches and returns three documents.
144+
indicate that the winning query plan returns three documents.
141145

142146
- :data:`executionStats.totalKeysExamined
143147
<explain.executionStats.totalKeysExamined>` displays ``0``
@@ -198,7 +202,7 @@ Query with No Index
198202
execution stats of the query:
199203

200204
- :guilabel:`Documents Returned` displays ``3`` to indicate
201-
that the query matches and returns three documents.
205+
that the winning query plan returns three documents.
202206

203207
- :guilabel:`Index Keys Examined` displays ``0`` to
204208
indicate that this query is not using an index.
@@ -296,8 +300,8 @@ To support the query on the ``quantity`` field, add an index on the
296300
``IXSCAN`` to indicate index use.
297301

298302
- :data:`executionStats.nReturned <explain.executionStats.nReturned>`
299-
displays ``3`` to indicate that the query matches and
300-
returns three documents.
303+
displays ``3`` to indicate that the winning query plan returns
304+
three documents.
301305

302306
- :data:`executionStats.totalKeysExamined
303307
<explain.executionStats.totalKeysExamined>` displays ``3``
@@ -363,7 +367,7 @@ To support the query on the ``quantity`` field, add an index on the
363367
execution stats of the query:
364368

365369
- :guilabel:`Documents Returned` displays ``3`` to indicate
366-
that the query matches and returns three documents.
370+
that the winning query plan returns three documents.
367371

368372
- :guilabel:`Index Keys Examined` displays ``3``
369373
to indicate that MongoDB scanned three index entries. The

0 commit comments

Comments
 (0)