14. Profiler
Profiler allows you to measure the performance and execution cost of SQL and PSQL code.
Fig. 14.1 Profiler
Select the connection of interest from the drop-down list.
Click the
Selectbutton and in the window that opens, select the user connection to be profiled:
Fig. 14.2 Selecting a user connection to profile
You can also open a saved profiler session by clicking the Load button:
Fig. 14.3 Saved Sessions
Formats for displaying the result:
Compact view- Displays an overall view of query execution. Repeating processes within a common parent will be merged into one. This is the default value.Display access data- Displays/hides the plan for executing the request. Enabled by default.Round values- If the total or average time is greater than 1000000ns, it will be converted to a larger unit until the value is less than 1000000ns. Enabled by default.
Cancel All Sessions button cancels all profiling sessions for the selected connection (with the specified ATTACHMENT_ID).
In compact view, for each non-last node (except for ROOT NODE - the root node) there is a node Total time,
which shows the time spent without taking into account child processes.
In result table displays information collected by the profiler, viz:
Process name or SQL code;
Time per process in nanoseconds (including child processes) and the percentage of time from the parent process;
Average time per process in nanoseconds (including child processes) for repetitive processes combined into one node;
Number of calls of the recurring processes.
При двойном клике по узлу откроется окно просмотра данных:
Fig. 14.4 Data view
A Profiler session can be run for a single query from the Query Editor by clicking the Run in Profiler button.
In this case the following will be executed:
Starts profiler session.
Query in the editor will be executed.
Profiler session will finish.
Displays profiler panel with the collected information.