Read the samples and the waits
To read how the query behaves over time, complete the following steps. If a tab is empty, skip it and go on.
Open the Query samples tab.
If the tab is empty, skip the next step.
Record what the samples show.
Points are individual query executions. The vertical axis is query duration. A query might usually take 10ms but occasionally take 10 seconds. Certain parameter values might cause slow execution. Performance might degrade during specific time windows.
Open the Wait events tab.
If the tab is empty, skip the next steps.
Switch the chart to the breakdown view.
Open the wait events dropdown and select Duration of wait events (breakdown). The breakdown names each wait event.
Record which specific wait events contribute the most time.
The overview chart groups individual wait event types into IO wait, Lock wait, and Network wait. The breakdown uses names such as
Lock:relationandIO:DataFileReadas examples. On PostgreSQL, Network wait isClient. Apply fixes based on the dominant wait event type.
You have a record of whether a query might usually take 10ms and occasionally take 10 seconds, and of which specific wait events contribute the most time.