Skip to content

Commit c35a21b

Browse files
DOCSP-13570 Add docs on how to use explain (#107)
1 parent 60ad3c3 commit c35a21b

File tree

1 file changed

+15
-3
lines changed

1 file changed

+15
-3
lines changed

source/supported-unsupported/mql-support.txt

Lines changed: 15 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -215,13 +215,25 @@ Diagnostic Commands
215215
The following ``verbosity`` modes are supported:
216216

217217
- ``queryPlanner`` - provides information on the query plan.
218-
- ``queryPlannerExtended`` - provides detailed information on the
219-
query plan including information about the |s3| objects, such as
220-
the |s3| object names and sizes, that will be queried.
218+
- ``queryPlannerExtended`` - provides detailed information on
219+
the query plan including information about the |s3| objects,
220+
such as the |s3| object names and sizes, that will be queried.
221221

222222
The ``executionStats`` and ``allPlansExecution`` modes are not
223223
supported.
224224

225+
.. example::
226+
227+
The following example shows how to use the ``explain``
228+
command to get information about the :manual:`aggregate
229+
</reference/command/aggregate>` command, including detailed
230+
information on the query plan.
231+
232+
.. code-block:: sh
233+
:copyable: false
234+
235+
db.runCommand({ "explain": { "aggregate": "user", "verbosity": "queryPlannerExtended", "pipeline": [ ], "cursor": {} }})
236+
225237
* - :manual:`getLog </reference/command/getlog>`
226238

227239
- The response returns successfully, but includes no log data.

0 commit comments

Comments
 (0)