Load By Waits (Query)
- The first chart in the bottom section, shows the load on the PostgreSQL database system, by wait events caused by a query's execution.
- Each bar represents load at a specific point in time.
- The load is measured in terms of average active sessions.
- The X-axis represents time and the Y-axis represents the average active sessions.
- Hover over the bar for more information.
- Longer the peak of the bar and higher the load number, higher the load on the system at that point in time.
- In a high load scenario, some of the load events that you may see are:
- CPU
- Disk I/O
- Transactions
- IPC
- Network I/O
- WAL (Write Ahead Log)
- Locks
- A high load scenario is most likely caused by a query.
- Identify the query and fine tune it to reduce the load on the system.
Peeking into the query
- Click on the query identifier under the
Query IDcolumn in any row. - A new view opens up with the complete query text, under the Query Text tab.
- To view the execution plan of the query, click on the Query Plans tab.
note
The collector's own session and idle in transaction sessions are not counted in this chart. Sessions that are idle in transaction are left out for all history; older collector rows count as normal load. See Load By Waits.
Query families and Tenants
(Available from the release that adds query families. The graphs in the query view also need the matching UI release.)
- Rows are grouped by query family: a family is the same query with schema names removed, across schemas and databases. A member of a family is one copy of the query, that is one query ID in one database.
- Load is summed over all members of the family. The row shows the query ID, database and text of the member with the most load.
- The Tenants column counts the members (copies of the query), not distinct tenants. One tenant that runs the query under two query IDs, or in two databases, counts twice.
- Click a row to open the query view. Below the plan it shows how the load is spread: Load over time (by wait event), Load by tenant (top 10 tenants, the rest as (others)) and Per-tenant detail (a table). A tenant is a database and schema.
- The per-database query chart is grouped the same way.
- An alert made from Top Queries, or from the per-database query chart, watches the load of one query ID in one database. It does not watch the total for the whole family.
- So the alert form's default threshold is set for that one query, not for the family total.