@@ -12,47 +12,69 @@ View Query Performance
12
12
:depth: 1
13
13
:class: singlecol
14
14
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.
17
17
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
+ ---------------
20
20
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.
24
25
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:
27
28
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
31
30
32
- .. figure:: /images/compass/explain-tree.png
33
- :figwidth: 400px
34
- :alt: Explain tree
31
+ - The number of returned documents
35
32
36
- Raw JSON
37
- --------
33
+ - The number of examined documents
38
34
39
- You can also view the explain details in raw JSON format:
35
+ - The number of examined index keys
40
36
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
52
40
to :atlas:`Data Lake </data-lake>`.
53
41
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