A monitoring agent asking information_schema.TABLES for table sizes every 30 seconds was causing the latency spikes it was supposed to detect. Why metadata reads cost real work, the two knobs that tame them, and how to find the offenders.
Database Topic Archive
MySQL Articles
InnoDB internals, replication, locking, query performance, and MySQL operations notes.
The most informative crash I ever debugged had an empty error log — mysqld was OOM-killed, and the silence was the clue. What changed in 8.0's log format, which warning lines deserve a page, and how to read crash recovery.
One month-end report held a read view for eleven hours, and the undo tablespaces grew by 38GB that never came back on their own. What undo logs store, how purge gets pinned, and the truncate surgery that reclaims the disk.
Fifty thousand tenant tables against a 4,000-entry table cache meant thousands of handle opens per second and a CPU-bound server. What the counters said, how we sized table_open_cache and table_definition_cache, and why the schema still had to change.
A nightly import of 380M rows spent more time merging the change buffer than inserting rows. What the change buffer defers, why unique indexes opt out, the two knobs that control it, and which workloads should disable it.
After an audit flipped sync_binlog from 0 to 1, every commit on an order cluster queued behind a binlog fsync and p99 commit latency went from 3ms to 41ms. A 1000-microsecond group-commit delay batched the fsyncs and brought p99 back…
A session-token table serving 52,000 point selects a second stalled on the btr_search latch for minutes at a time. What the adaptive hash index really is, how to see the contention, and how to test turning it off without guessing.
Percona XtraBackup plus binary logs is still the workhorse recovery story for self-managed MySQL. These are field notes on the full/incremental cadence, prepare ordering, and the restore rehearsal that catches bad backups.
performance_schema has a reputation for overhead it no longer deserves. Field notes on which instruments and consumers to enable, how to measure the memory cost, and how digests catch query regressions before customers do.
CTEs and window functions made MySQL 8.0 queries readable, and occasionally much slower. Field notes on derived_merge, materialization, window frame costs, and the cases where the old JOIN still wins.