QueryTuning.org
Database Query Performance Reference
Coverage
Featured Story
SQL Server Query Performance Plan Cache
The SET Options Your Application Sets Without Telling You — and How They Silently Break Query Performance
Your DBA runs the query in SSMS in 200ms. The application runs the same SQL in 8 seconds. Same parameters, same server, different plan. The culprit is almost always ARITHABORT OFF on the application driver causing a plan cache split. Full diagnosis: bitmask decode in sys.dm_exec_cached_plans, why filtered indexes stop working silently, and the fix that requires zero application code changes.
⏱ 13 min read · SQL Server 2016+ · Apr 7, 2026
Read the full story →
Also this week
PostgreSQLAutovacuum
The Autovacuum That Quietly Ate Our Entire IOPS Budget for Six Weeks
⏱ 14 min · PostgreSQL 10+
MySQLPost-Mortem
Our Read Replica Was 14 Hours Behind — Seconds_Behind_Master Said Zero
⏱ 10 min · MySQL 5.7+
PGSSMYOR
Lock Wait Emergency Runbook — All Four Databases
Runbook · All databases · Updated Apr 2026
By Database Engine
Recent Stories
All stories →
MySQLPost-Mortem
The Subquery That Returned Correct Results in 5.7 and Wrong in 8.0
After upgrading, revenue reports showed totals 23% higher than the payment processor. The derived_merge optimization silently eliminated a DISTINCT — a confirmed product bug.
⏱ 11 min · MySQL 8.0
SQL ServerPost-Mortem
SQL Server 2016 Froze Every 30 Seconds for Exactly 10 Seconds
After upgrading from 2014, metronome-precise freezes. Storage idle during the stalls. A confirmed product bug in indirect checkpoint — KB4040276.
⏱ 10 min · SQL Server 2016
OraclePost-Mortem
Result Cache Turned a 3-Second Query into a 45-Minute Latch Storm
A RESULT_CACHE hint — 150x faster in test. Under 200 concurrent sessions, every CPU core spun on a single latch. An Oracle 12c product bug.
⏱ 11 min · Oracle 12c
SQL ServerPost-Mortem
An Orphaned DTC Transaction Held a Lock for 11 Days
A linked-server query to Oracle failed mid-transaction. The remote side rolled back. The local DTC transaction stayed open for 11 days, holding an exclusive lock.
⏱ 11 min · SQL Server 2014+
OraclePost-Mortem
ORA-01652 Every Monday at 9:05 AM for Seven Weeks
The DBA added 20GB to temp every week. DEGREE DEFAULT spawned 64 parallel slaves, each building its own hash table — 192GB for a 3GB join.
⏱ 10 min · Oracle 11g+
SQL ServerPost-Mortem
Queries Waited 47 Minutes for Memory Grants That Never Came
340 sessions queued behind one report granted 14GB and using 3GB. A 21x cardinality overestimate from 45-day-old stats locked the workspace pool.
⏱ 12 min · SQL Server 2016+
More Stories
Browse all →
01
SQL ServerPost-Mortem
Ghost Cleanup Consumed All Disk IOPS After a 90M Row Delete
No active queries writing. Ghost cleanup silently reclaimed pages across 8 indexes at 15,000 IOPS — the full capacity of the storage array.
⏱ 11 min · SQL Server 2014+
02
SQL ServerPost-Mortem
Auto Stats Update Triggered 2,000 Recompilations in 90 Seconds
Synchronous auto stats on a hot table invalidated 2,000 cached plans. CPU hit 100% as a thundering herd of compilations overwhelmed 8 schedulers.
⏱ 11 min · SQL Server 2016+
03
OraclePost-Mortem
The Adaptive Plan That Chose Hash Join for 7 Rows
After upgrading to 12c, a lookup query randomly slowed from 2ms to 14 seconds. Adaptive plans flipped join methods based on one outlier execution.
⏱ 10 min · Oracle 12c+
04
OraclePost-Mortem
DBMS_STATS Locked 200 Sessions Out for 8 Minutes
Stats gathering overran into peak hours. Exclusive dictionary locks on a 400-partition table blocked every INSERT and UPDATE for 8 minutes.
⏱ 10 min · Oracle 11g+
05
SQL ServerPost-Mortem
TempDB Allocation Contention Stalled Our Entire OLTP Workload
PAGELATCH_EX waits on allocation pages. CPU at 6%, no blocking chains. The fix: four TempDB data files for a default installation nobody had questioned.
⏱ 7 min · SQL Server 2014+
06
SQL ServerPost-Mortem
58 Seconds Frozen on Black Friday
One forgotten SSMS query window, 847 checkout requests queued behind a shared lock for 58 seconds on the highest-traffic day of the year.
⏱ 11 min · SQL Server 2014+
View all stories →
The Runbook Newsletter
One story every Tuesday
A fully written database incident in your inbox. No summaries. Just the full story.
Emergency Runbooks
🔒 Lock Wait & DeadlockAll DBs
💾 Disk FullSoon
🔥 CPU at 100%Soon
🐢 Slow QuerySoon
📡 Replication LagSoon
Browse by Problem
Query Performance Locking Memory Disk & I/O Replication CPU Indexing High Availability