Skip to content

Commit e15191d

Browse files
authored
DOCSP-31519 Query Explain Plan UI Change (#528)
* DOCSP-31519 Query Explain Plan UI Change * wording * typos + learn more * image sizing * image sizing * wording * SO feedback
1 parent fef7891 commit e15191d

File tree

3 files changed

+56
-34
lines changed

3 files changed

+56
-34
lines changed
180 KB
Loading

source/images/compass/query-plan.png

-108 KB
Loading

source/query-plan.txt

Lines changed: 56 additions & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -12,47 +12,69 @@ View Query Performance
1212
:depth: 1
1313
:class: singlecol
1414

15-
The :guilabel:`Explain Plan` tab displays the execution plan for a
16-
query.
15+
To help you better understand the performance of your query, you can view
16+
your query's explain plan.
1717

18-
To view the execution plan for a query filter, click on the collection
19-
on the left hand pane, then click :guilabel:`Explain Plan`.
18+
About This Task
19+
---------------
2020

21-
.. figure:: /images/compass/query-plan.png
22-
:figwidth: 696px
23-
:alt: Query plan
21+
On the :guilabel:`Explain Plan` modal, you can view the explain stages as a
22+
:guilabel:`Visual Tree`, where each query operation appears as a node on the
23+
tree. You can also view the explain details in raw JSON format by selecting
24+
the :guilabel:`Raw Output` view.
2425

25-
Visual Tree
26-
-----------
26+
The explain plan includes a :guilabel:`Query Performance Summary` with
27+
information on the execution of your query such as:
2728

28-
You can view the explain stages in a tree format. Each stage of the
29-
pipeline appears as a node on the tree. This makes sharded cluster
30-
outputs easier to understand and visualize.
29+
- Execution time
3130

32-
.. figure:: /images/compass/explain-tree.png
33-
:figwidth: 400px
34-
:alt: Explain tree
31+
- The number of returned documents
3532

36-
Raw JSON
37-
--------
33+
- The number of examined documents
3834

39-
You can also view the explain details in raw JSON format:
35+
- The number of examined index keys
4036

41-
.. figure:: /images/compass/query-plan3.png
42-
:figwidth: 600px
43-
:alt: Query plan JSON
44-
45-
To learn more about execution plans, see the
46-
:manual:`MongoDB documentation </tutorial/analyze-query-plan/>`.
47-
48-
Limitations
49-
-----------
50-
51-
- The :guilabel:`Explain Plan` tab is not available if you are connected
37+
.. note::
38+
39+
The :guilabel:`Explain Plan` is not available if you are connected
5240
to :atlas:`Data Lake </data-lake>`.
5341

54-
- The :guilabel:`Explain Plan` tab is not available for
55-
:manual:`aggregation commands </aggregation/>`. Instead,
56-
you can utilize the :manual:`.explain()
57-
</reference/method/db.collection.explain>` method from :doc:`Embedded
58-
MongoDB Shell </embedded-shell>` in |compass-short|.
42+
Steps
43+
-----
44+
45+
.. procedure::
46+
:style: normal
47+
48+
.. step:: Click the Explain button
49+
50+
In the query bar, click the :guilabel:`Explain` button to open the
51+
modal.
52+
53+
.. figure:: /images/compass/query-plan.png
54+
:figwidth: 696px
55+
:alt: Query plan
56+
57+
.. step:: Select a query operation
58+
59+
By default, the explain stages are are shown as a :guilabel:`Visual Tree`.
60+
Each query operation appears as a node on the tree.
61+
62+
For more detailed execution information about the query operation, click
63+
the corresponding node.
64+
65+
For example, the following explain plan provides detailed information on
66+
a query that filters for ``{ title : "Jurassic Park" }``:
67+
68+
.. figure:: /images/compass/explain-tree.png
69+
:alt: Detailed Visual Tree view
70+
:figwidth: 696px
71+
72+
.. step:: (Optional) Select the :guilabel:`Raw Output` view.
73+
74+
To view your full explain plan as raw JSON, select the
75+
:guilabel:`Raw Output` view.
76+
77+
Learn More
78+
----------
79+
80+
- :manual:`Analyze Query Performance </tutorial/analyze-query-plan/>`

0 commit comments

Comments
 (0)