Database Topic Archive

MySQL Articles

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

The Hidden Locking Cost of Foreign Keys in MySQL
6 min read

Foreign keys feel free until the parent row gets hot. InnoDB's FK checks take shared locks on the parent, cascades multiply your lock footprint, and the contention never names the FK as the cause.

The InnoDB Doublewrite Buffer: An Honest Audit of Its I/O Cost
7 min read

Doublewrite really does write every flushed page twice, and the honest cost lands somewhere between unmeasurable and painful depending on your flush pattern. Here is how to measure it on your own hardware instead of quoting folklore.

MySQL Connection Pool Sizing: max_connections Folklore vs Reality
8 min read

Raising max_connections is the most common MySQL tuning move and usually the wrong one. Here is how thread-per-connection actually costs you, why Threads_running is the real signal, and how to size app pools and ProxySQL with actual math.