Database Topic Archive

MySQL Articles

InnoDB internals, replication, locking, query performance, and MySQL operations notes.

MySQL Replication Lag Diagnosis Beyond Seconds_Behind_Source
7 min read

Seconds_Behind_Source is the most quoted and least trusted replication metric in MySQL. This deep dive covers heartbeat-based lag measurement, multi-threaded replica tuning, and the big-transaction lag pattern.

MySQL Partitioning in Production: An Operational Guide
7 min read

Partitioning solves data-lifecycle problems, not performance problems. Field notes on verifying pruning, automating partition maintenance, living with the foreign-key restriction, and knowing when to say no.

MySQL optimizer_trace: The Microscope for Wrong Plan Decisions
6 min read

EXPLAIN tells you which plan MySQL chose; optimizer_trace tells you which plans it rejected and why. Per-session capture, reading considered_execution_plans, cost numbers, truncation traps, and a worked wrong-index case.