Skip to content

Commit e16fa57

Browse files
committed
DOCS-911 make explain output less terse
1 parent abde0fa commit e16fa57

File tree

3 files changed

+68
-58
lines changed

3 files changed

+68
-58
lines changed

source/reference/explain.txt

Lines changed: 60 additions & 50 deletions
Original file line numberDiff line numberDiff line change
@@ -129,7 +129,8 @@ Core Explain Output
129129

130130
.. data:: cursor
131131

132-
Specifies the type of cursor used in the query operation:
132+
:data:`cursor` is a string value that returns the type of cursor
133+
used in the query operation:
133134

134135
- ``BasicCursor`` indicates use of full collection scan.
135136

@@ -142,53 +143,56 @@ Core Explain Output
142143

143144
.. data:: isMultiKey
144145

145-
A boolean, that specifies if the index used in this query is a
146-
:ref:`multikey index <index-type-multikey>` on a field that holds
147-
an array.
146+
:data:`isMultiKey` is a boolean value that returns ``true`` if the
147+
index used in this query is a :ref:`multikey index
148+
<index-type-multikey>` on a field that holds an array.
148149

149150
.. data:: n
150151

151-
Specifies the number of documents that match the query selection
152-
criteria.
152+
:data:`n` is a number value that returns the number of documents
153+
that match the query selection criteria.
153154

154155
.. data:: nscannedObjects
155156

156-
Specifies the total number of documents scanned during the query.
157-
The :data:`nscannedObjects` may be lower than :data:`nscanned`, such
158-
as if the index is a covered index.
157+
:data:`nscannedObjects` is a number value that returns the total
158+
number of documents scanned during the query. The
159+
:data:`nscannedObjects` may be lower than :data:`nscanned`, such as
160+
if the index is a covered index.
159161

160162
.. data:: nscanned
161163

162-
Specifies the total number of documents or index entries scanned
163-
during the database operation. You want :data:`n` and
164-
:data:`nscanned` to be close in value as possible. The
165-
:data:`nscanned` value may be higher than the
164+
:data:`nscanned` is a number value that returns the total number of
165+
documents or index entries scanned during the database operation.
166+
You want :data:`n` and :data:`nscanned` to be close in value as
167+
possible. The :data:`nscanned` value may be higher than the
166168
:data:`nscannedObjects` value, such as if the index is a covered
167169
index.
168170

169171
.. data:: nscannedObjectsAllPlans
170172

171173
.. versionadded:: 2.2
172174

173-
Specifies the total number of documents scanned for all query plans
174-
during the database operation.
175+
:data:`nscannedObjectsAllPlans` is a number value that returns the
176+
total number of documents scanned for all query plans during the
177+
database operation.
175178

176179
.. data:: nscannedAllPlans
177180

178181
.. versionadded:: 2.2
179182

180-
Specifies the total number of documents or index entries scanned for
181-
all query plans during the database operation.
183+
:data:`nscannedAllPlans` is a number value that returns the total
184+
number of documents or index entries scanned for all query plans
185+
during the database operation.
182186

183187
.. data:: scanAndOrder
184188

185189
.. versionadded:: 2.2
186190

187191
:data:`scanAndOrder` is a boolean value that returns ``true`` when
188-
the query cannot use the index for returning sorted results.
192+
the query **cannot** use the index for returning sorted results.
189193

190-
When ``false`` MongoDB must sort documents retrieving the documents
191-
using either an index cursor or by cursor that scans the entire
194+
When ``true``, MongoDB must sort the documents after it retrieves
195+
them from either an index cursor or a cursor that scans the entire
192196
collection.
193197

194198
.. data:: indexOnly
@@ -200,24 +204,25 @@ Core Explain Output
200204

201205
.. data:: nYields
202206

203-
Specifies the number of times this query yielded the read lock to
204-
allow waiting writes execute.
207+
:data:`nYields` is a number value that returns the number of times
208+
this query yielded the read lock to allow waiting writes execute.
205209

206210
.. data:: nChunkSkips
207211

208-
Specifies the number of documents skipped because of active chunk
209-
migrations in a sharded system. Typically this will be zero. A
210-
number greater than zero is ok, but indicates a little bit of
211-
inefficiency.
212+
:data:`nChunkSkips` is a number value that returns the number of
213+
documents skipped because of active chunk migrations in a sharded
214+
system. Typically this will be zero. A number greater than zero is
215+
ok, but indicates a little bit of inefficiency.
212216

213217
.. data:: millis
214218

215-
Specifies the number of milliseconds to complete the query.
219+
:data:`millis` is a number value that returns the time in
220+
milliseconds to complete the query.
216221

217222
.. data:: indexBounds
218223

219-
Specifies the lower and upper index key bounds. This field
220-
resembles one of the following:
224+
:data:`indexBounds` is a document that contains the lower and upper
225+
index key bounds. This field resembles one of the following:
221226

222227
.. code-block:: javascript
223228

@@ -234,24 +239,25 @@ Core Explain Output
234239

235240
.. data:: allPlans
236241

237-
Specifies the list of plans the query optimizer runs in order to
238-
select the index for the query. Displays only when the ``<verbose>``
239-
parameter to :method:`explain() <cursor.explain()>` is
240-
``true`` or ``1``.
242+
:data:`allPlans` is an array value that returns the list of plans
243+
the query optimizer runs in order to select the index for the query.
244+
Displays only when the ``<verbose>`` parameter to :method:`explain()
245+
<cursor.explain()>` is ``true`` or ``1``.
241246

242247
.. data:: oldPlan
243248

244249
.. versionadded:: 2.2
245250

246-
Specifies the previous plan selected by the query optimizer for the
247-
query. Displays only when the ``<verbose>`` parameter to
248-
:method:`explain() <cursor.explain()>` is ``true`` or ``1``.
251+
:data:`oldPlan` is a document value that returns the previous plan
252+
selected by the query optimizer for the query. Displays only when
253+
the ``<verbose>`` parameter to :method:`explain()
254+
<cursor.explain()>` is ``true`` or ``1``.
249255

250256
.. data:: server
251257

252258
.. versionadded:: 2.2
253259

254-
Specifies the MongoDB server.
260+
:data:`server` is a string value that returns the MongoDB server.
255261

256262
.. _explain-output-field-or-clauses:
257263

@@ -260,10 +266,10 @@ Core Explain Output
260266

261267
.. data:: clauses
262268

263-
Contains the :ref:`explain-output-fields-core` information for each
264-
clause of the :operator:`$or` expression. :data:`classes` is only
265-
included when the clauses in the :operator:`$or` expression use
266-
indexes.
269+
:data:`clauses` is an array value that returns the
270+
:ref:`explain-output-fields-core` information for each clause of the
271+
:operator:`$or` expression. :data:`classes` is only included when
272+
the clauses in the :operator:`$or` expression use indexes.
267273

268274
.. _explain-output-fields-sharded-collection:
269275

@@ -272,31 +278,35 @@ Sharded Collections Output
272278

273279
.. data:: clusteredType
274280

275-
Describes the access pattern for shards. The value is:
281+
:data:`clusteredType` is a string value that returns the access
282+
pattern for shards. The value is:
276283

277284
- ``ParallelSort``, if the :program:`mongos` queries shards in parallel.
278285

279286
- ``SerialServer``, if the :program:`mongos` queries shards sequentially.
280287

281288
.. data:: shards
282289

283-
Specifies the shards accessed during the query and individual
284-
:ref:`explain-output-fields-core` for each shard.
290+
:data:`shards` is a document value that contains the shards accessed
291+
during the query and individual :ref:`explain-output-fields-core`
292+
for each shard.
285293

286294
.. data:: millisShardTotal
287295

288-
Specifies the total time in milliseconds for the query to run on the
289-
shards.
296+
:data:`millisShardTotal` is a number value that returns the total
297+
time in milliseconds for the query to run on the shards.
290298

291299
.. data:: millisShardAvg
292300

293-
Specifies the average time in millisecond for the query to run on
294-
each shard.
301+
:data:`millisShardAvt` is a number value that returns the average
302+
time in millisecond for the query to run on each shard.
295303

296304
.. data:: numQueries
297305

298-
Specifies the total number of queries executed.
306+
:data:`numQueries` is a number value that returns the total number
307+
of queries executed.
299308

300309
.. data:: numShards
301310

302-
Specifies the total number of shards queried.
311+
:data:`numShards` is a number value that returns the total number of
312+
shards queried.

source/reference/method/cursor.explain.txt

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -79,10 +79,10 @@ cursor.explain()
7979

8080
- :operator:`$explain`
8181

82-
- :wiki:`Optimization` wiki page for information regarding
83-
optimization strategies.
82+
- :doc:`/applications/optimization` page for information
83+
regarding optimization strategies.
8484

85-
- :wiki:`Database Profiler` wiki page for information regarding
86-
optimization strategies.
85+
- :doc:`/tutorial/manage-the-database-profiler` tutorial for
86+
information regarding the database profile.
8787

8888
- :doc:`Current Operation Reporting </reference/current-op>`

source/reference/operator/explain.txt

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -73,10 +73,10 @@ $explain
7373

7474
- :method:`cursor.explain()`
7575

76-
- :wiki:`Optimization` wiki page for information regarding
77-
optimization strategies.
76+
- :doc:`/applications/optimization` page for information
77+
regarding optimization strategies.
7878

79-
- :wiki:`Database Profiler` wiki page for information regarding
80-
optimization strategies.
79+
- :doc:`/tutorial/manage-the-database-profiler` tutorial for
80+
information regarding the database profile.
8181

8282
- :doc:`Current Operation Reporting </reference/current-op>`

0 commit comments

Comments
 (0)