Skip to content

Commit af60fcd

Browse files
authored
DOCS-16286-explain-executionStats-nReturned-incorrect-desc (#6132) (#6226)
* 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 7dfb155 commit af60fcd

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
@@ -557,7 +557,7 @@ representative. Your output may differ significantly.
557557

558558
.. data:: explain.executionStats.nReturned
559559

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

@@ -841,7 +841,6 @@ The following fields are included in the explain results for a
841841
totalKeysExamined: <long>,
842842
collectionScans: <long>,
843843
indexesUsed: [ <string_1>, <string_2>, ..., <string_n> ],
844-
nReturned: <long>,
845844
executionTimeMillisEstimate: <long>
846845

847846
To see the descriptions for the fields in the ``$lookup`` section, see
@@ -869,10 +868,6 @@ The other fields are:
869868

870869
Array of strings with the names of the indexes used by the query.
871870

872-
.. data:: explain.nReturned
873-
874-
Number of documents that match the query condition.
875-
876871
.. data:: explain.executionTimeMillisEstimate
877872

878873
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
@@ -141,7 +145,7 @@ Query with No Index
141145

142146
- :data:`executionStats.nReturned
143147
<explain.executionStats.nReturned>` displays ``3`` to
144-
indicate that the query matches and returns three documents.
148+
indicate that the winning query plan returns three documents.
145149

146150
- :data:`executionStats.totalKeysExamined
147151
<explain.executionStats.totalKeysExamined>` displays ``0``
@@ -202,7 +206,7 @@ Query with No Index
202206
execution stats of the query:
203207

204208
- :guilabel:`Documents Returned` displays ``3`` to indicate
205-
that the query matches and returns three documents.
209+
that the winning query plan returns three documents.
206210

207211
- :guilabel:`Index Keys Examined` displays ``0`` to
208212
indicate that this query is not using an index.
@@ -301,8 +305,8 @@ To support the query on the ``quantity`` field, add an index on the
301305
``IXSCAN`` to indicate index use.
302306

303307
- :data:`executionStats.nReturned <explain.executionStats.nReturned>`
304-
displays ``3`` to indicate that the query matches and
305-
returns three documents.
308+
displays ``3`` to indicate that the winning query plan returns
309+
three documents.
306310

307311
- :data:`executionStats.totalKeysExamined
308312
<explain.executionStats.totalKeysExamined>` displays ``3``
@@ -368,7 +372,7 @@ To support the query on the ``quantity`` field, add an index on the
368372
execution stats of the query:
369373

370374
- :guilabel:`Documents Returned` displays ``3`` to indicate
371-
that the query matches and returns three documents.
375+
that the winning query plan returns three documents.
372376

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

0 commit comments

Comments
 (0)