Know why your PostgreSQL got slower.
Querywake finds the queries that got slower, separates a real regression from more traffic, and shows the evidence for what changed, so you know where to investigate next.
Where it runs
Free plan
Slower executions
Mean execution time went from 0.318 ms to 21.8 ms.
Each execution of the statement takes longer than its baseline. Detection rule met: added 526.6 ms/s ≥ 250 ms/s.
select count(*), sum(amount) from bench.orders where customer_id = $1
- ×68.6
- ×66.6
- Index no longer used
- 11 min
Impact
| Metric | Baseline | During | Change |
|---|---|---|---|
| Mean execution time | 0.318 ms | 21.8 ms | ×68.6 (adverse) |
| Calls per second | 25.24/s | 24.51/s | ×0.97 |
| Execution time per second | 8.0 ms/s | 534.4 ms/s | ×66.6 (adverse) |
| Rows per call | 1 row | 1 row | ×1.00 |
| Shared blocks read per call | 0 blocks | 0 blocks | — |
| Shared blocks hit per call | 18 blocks | 4919 blocks | ×273 |
| Temp blocks written per call | 0 blocks | 0 blocks | — |
Mean execution time
Calls per second
A slower query and a busier query are different problems.
A statement that takes more total time because it runs twice as often needs a different response from one whose plan changed. Querywake compares each statement with its own baseline and reports each kind of change on its own.
Not real time
- Slower executions
- Each execution of the statement takes longer than its baseline.
- More executions
- The statement runs more often than its baseline.
- More execution time
- The statement spends more time executing per second than its baseline.
- More temporary file use
- Queries write more temporary blocks (work spilling past work_mem) than their baseline.
- Lower buffer cache effectiveness
- A larger share of block requests missed shared buffers than in the baseline.
- More lock waiting
- More sessions waited on heavyweight locks than in the baseline.
- More rollbacks
- Transactions rolled back at a higher rate than in the baseline.
- Workload mix changed
- The share of execution time across statements shifted compared with the baseline.
Every cause comes with what supports it, what speaks against it and what could not be observed.
Causes are ranked by fixed rules over the collected evidence, not guessed probabilities. What contradicts an explanation and what the telemetry cannot see get the same space as what supports it, so you can check the reasoning yourself.
The rule
No percentages
Index no longer used
Likely- index indexrelid 16447 on relid 16440 present at the start of the window and no longer reported at its end
- sequential scans on relid 16440 rose from 0.000/s to 72.986/s
- shared blocks hit per call ×273
none- Statements are not linked to the relations they access in telemetry; only plans establish that link.
Execution plan change
Possible- shared blocks hit per call ×273
none- No plan for this statement was supplied (plans are never captured automatically).
Lock contention
Unlikelynone- no session waited on a heavyweight lock in any of 9 lock samples
- Lightweight-lock (LWLock) and buffer-pin waits are not sampled.
Cache pressure
Unlikelynone- more buffer hits per call without more reads: more pages touched, not fewer cached
- Shared-buffer misses may still be served by the OS page cache; track_io_timing shows actual read time.
Sorts or hashes spilling to disk
Unlikelynone- temporary blocks written per call did not increase
noneParameter or data distribution shift
Not assessablenonenone- Parameter values are never collected; a shift to more expensive parameters cannot be observed directly.
Shared resource contention
Not assessablenonenone- Host CPU, I/O and wait-event time series are not part of the analyzed telemetry.
Upload EXPLAIN plans and Querywake compares them.
The comparison separates what changed in the structure of the plan from what was measured to change.
How plans arrive
- Access path changed
- Bitmap Heap Scan via orders_customer_idx to Seq Scan
- no ratio
- Parallelism gained
- no parallel workers to 2 workers
- no ratio
- Execution time increased
- 0.552 ms to 32.022 ms
- ×58.0
- Buffers increased
- 18 to 4974
- ×276
It reads statistics. It does not change your database.
Here is what it does not do. Read the security overview.
Where it is verified
- No writes, no EXPLAIN
- The collector connects with a pg_monitor role that has a connection limit. Querywake never writes to your database and never runs EXPLAIN. Every check it suggests is for a person to review and apply.
- No parameter values, no table data
- Query text is off by default. When you turn it on, statements arrive normalized, with literals replaced by $1. Parameter values and table data are never collected.
- No generated explanations
- Detection and cause analysis are fixed rules over the collected statistics. Querywake runs no language model, so the same evidence always gives the same assessment.
- Nothing of ours inside PostgreSQL
- No agent or extension of ours runs in the server. pg_stat_statements is the only requirement.
- Credentials stay with you
- With the collector, the database URL is read on your host. Querywake receives statistics and a collector token you can rotate or revoke. Query text, log events and plans are sent only if you turn them on.
- Survives network outages
- The collector spools to local disk with a size cap and sends what it buffered when the connection returns.
Connect with one prompt, or by hand.
Either way the steps are the same, and superuser is never needed.
Open-source collector
With your coding agent
Use your existing coding agent to prepare your database and set up Querywake monitoring. No additional AI subscription required, and the prompt tells your agent to ask before every change.
The prompt contains no credentials. You enter secrets yourself on the setup page, and setup counts as done only when Querywake receives telemetry.
By hand
Create a read-only role
Enable pg_stat_statements and grant pg_monitor to a login role. The collector never needs superuser.
CREATE ROLE querywake LOGIN PASSWORD '…'; GRANT pg_monitor TO querywake; ALTER ROLE querywake CONNECTION LIMIT 5; CREATE EXTENSION IF NOT EXISTS pg_stat_statements;Run the collector next to PostgreSQL
One binary or container on a host that reaches the database. The connection string stays on that host.
querywake probe -c /etc/querywake/collector.toml querywake collect -c /etc/querywake/collector.tomlWait for the first analysis
After about an hour of history, a statement that regresses opens an incident with its ratio, its window and its likely causes.
Start with one database, free.
The Free plan needs no card and does not expire. Paid plans sample more often, keep more history and add advisors, integrations and AI agent access.