A retention job deleting eleven million rows a month from a partitioned table, one batch at a time, without touching the partition boundary. The partitioning had been done…
A query creating an internal temporary table that exceeded the in-memory limit on every execution, silently. The ratio of disk to memory temporary tables is the diagnostic and…
A status column where one value covers ninety-four per cent of rows, and an optimiser assuming an even distribution. Histograms are for columns that are skewed and not…
Splitting the billing schema onto its own instance in 2021, and rejoining it three years later because every report crossed the boundary. The reason given in 2021 was…
An index on (created_at, status) serving a query that filters on status and ranges on date, which uses the first column and stops. The rule is equality columns…
ALGORITHM=INPLACE does not mean lock-free, and the operation that needed a table rebuild took a metadata lock at the end anyway. Specifying LOCK=NONE turns an unpleasant surprise into…