Skip to content

Query history

Selecting a query anywhere in QueryPilot opens its query page: identity at the top, history in the middle and execution plans below.

  • Normalized query: the statement with literals replaced by ?, copyable. If query-text storage is disabled, the fingerprint identifies the query instead.
  • Statement type: SELECT, INSERT, UPDATE, DELETE, DDL, UTILITY, OTHER or UNKNOWN.
  • Fingerprint: a SHA-256 of the canonical query text. The same statement always produces the same fingerprint.
  • The database it belongs to, and when it was first and last seen.

Choose the last 15 minutes, 1 hour (default), 6 hours, 24 hours, 7 days, or a custom range. Buckets are sized automatically (at least one minute, and never more than 1,000 points).

Tile Notes
Calls, Calls/min Executions in the window.
Mean Exact per window: total time ÷ calls.
p50 / p95 / p99 (est.) Estimated; see below.
Total time Execution time summed over the window.
Rows/call Rows returned or affected per execution.
Cache hit ratio Shared buffer hits ÷ shared blocks touched. Empty when no blocks were touched.
Temp blocks written Non-zero means sorts or hashes spilled to disk.

pg_stat_statements does not record individual execution times. QueryPilot estimates percentiles from each interval’s exact mean and variance using a log-normal model, capped at the observed maximum. They are labelled est. everywhere.

  • Latency: mean (solid) and estimated p50, p95 and p99 (dashed).
  • Calls per minute.
  • I/O: shared blocks read and temp blocks written per bucket.

Charts are plain SVG, keyboard accessible (focus a chart and use the arrow keys), with times in UTC.

  • Grey dashed vertical: stats reset. The query’s counters were reset; the reset is detected and excluded rather than producing negative values.
  • Violet dashed vertical: plan changed. A new plan version for this query was first captured at that time. Markers are buttons: select one to open that plan version in the Execution plans section. This is the fastest way to connect a latency change with a plan change.

A bucket with no executions is drawn as a gap, never as zero: QueryPilot cannot tell “idle” from “not collected” for a bucket, and a zero would claim the former.

In the query explorer, an amber dot next to a query means it was first observed inside the selected window, so earlier activity is not included in its figures.