5.29. Query Plan Visualization #
PPEM supports visualization of query plans that can be retrieved using the EXPLAIN command. For more information about this command, refer to the official Postgres Pro documentation.
The visualization contains a tree of query plan nodes and allows you to navigate between them. Each node has a unique name and corresponds to the specified stage of query execution. Clicking on a node name displays expanded information about this node.
This section explains how to manage query plan visualizations. It includes the following instructions:
Creating a Query Plan Visualization
Before performing this instruction:
Get the query plan:
EXPLAIN (ANALYZE, COSTS, VERBOSE, BUFFERS, FORMAT JSON)
Copy the query plan and save it.
To create a query plan visualization:
In the navigation panel, go to Monitoring → Visualization.
Enter parameters of the new query plan visualization (parameters marked with an asterisk are required):
Name.
If you do not specify the name, it is generated automatically.
Query plan: The query plan that will be visualized.
Query: The text of the query whose plan will be visualized.
If you specify query text, it is added to the query plan visualization.
To create a visualization based on a query plan example, in Examples, click
next to the example. In this case, parameter values of the query plan visualization are filled in automatically.
Click Visualize.
Viewing a Query Plan Visualization
In the navigation panel, go to Monitoring → Visualization.
In Saved plans, click the name of the query plan visualization.
Editing a Query Plan Visualization
In the navigation panel, go to Monitoring → Visualization.
In Saved plans, click
next to the query plan visualization.
Edit query plan visualization parameters.
Click Visualize.
Deleting a Query Plan Visualization
Important
Deleted query plan visualizations cannot be restored.
To delete a query plan visualization:
In the navigation panel, go to Monitoring → Visualization.
In Saved plans, click
next to the query plan visualization.