Read-only demo.One recorded hour of Querywake's lab: PostgreSQL 17 under pgbench, where the index behind a customer lookup was dropped and later restored. Nothing here comes from a customer database.
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. Closed as expired (baseline adapted): frozen baseline reached its maximum age while the change persisted; the new level was accepted as normal.
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 around the incident
Explanation
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.
Next checks
- 1
Check whether the index still exists and is valid (pg_index.indisvalid) and whether it was dropped or rebuilt recently (DDL/audit logs, deploy history).
Index presence and validity confirmed.
No risk recorded for this check.
- 2
If an index was removed unintentionally, evaluate recreating it with CREATE INDEX CONCURRENTLY in a maintenance window after testing on a copy.
The statement's plan uses the index and its mean execution time returns to baseline.
Index builds consume I/O and CPU; CONCURRENTLY takes longer and can leave an invalid index on failure; additional indexes slow writes.
- 3
Compare the current plan with a known-good plan (querywake plan compare). Check whether ANALYZE/autoanalyze ran on the involved tables just before the change and whether row estimates diverge from actual rows.
The new plan's structural fingerprint matches the known-good plan and the latency returns to baseline.
EXPLAIN ANALYZE executes the statement; run it only where that is acceptable (read-only statement, replica, or rolled-back transaction).
- 4
If estimates are wrong because of stale or insufficient statistics, consider a manual ANALYZE of the affected table or extended statistics (CREATE STATISTICS) for correlated columns.
Estimated and actual row counts agree within an order of magnitude in a new plan.
ANALYZE takes a SHARE UPDATE EXCLUSIVE lock and reads a sample; extended statistics change plans for other statements too.
Timeline
- Candidate (not yet confirmed)
- Candidate (not yet confirmed) → Active
- Active → Expired
Evidence
- shared blocks hit per call ×273
- 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
- no session waited on a heavyweight lock in any of 9 lock samples
Related incidents
- More execution timeselect count(*), sum(amount) from bench.orders where customer_id = $1