Blog: notes on backend, data and AI
Notes on backend engineering, data and building products with AI.
November 25, 2026 · 4 min read
InnoDB indexes: B+Tree, clustered, secondary and covering
Every InnoDB table is a B+Tree ordered by its primary key. Understand clustered and secondary indexes, the extra lookup they cause, and how covering indexes remove it.
mysqlinnodbindexing
November 25, 2026 · 4 min read
Deadlocks in MySQL: find them, prevent them, retry them
A deadlock is two transactions waiting for each other. InnoDB breaks it by rolling one back, so your code must retry. Here is how to read the report and design the cause away.
mysqlinnodblocking
November 25, 2026 · 4 min read
InnoDB locks: record, gap and next-key locks
InnoDB locks index entries, not abstract rows. Learn what record, gap, next-key and intention locks protect, and why a query without a usable index can lock far more than you expect.
mysqlinnodblocking
November 25, 2026 · 4 min read
MVCC in InnoDB: snapshot reads versus current reads
InnoDB keeps several versions of a row so readers do not block writers. The catch is that a plain SELECT and a locking read can see different data.
mysqlinnodbtransactions
November 25, 2026 · 4 min read
Isolation levels and anomalies in MySQL
Dirty reads, non-repeatable reads, phantoms and lost updates are what isolation levels are about. See what each level allows and what InnoDB does by default.
mysqlinnodbtransactions
November 25, 2026 · 4 min read
ACID in InnoDB: WAL, redo log, undo log and the binlog
ACID is not magic. In InnoDB, atomicity comes from the undo log, durability from the redo log, and the binlog is a separate log for replication and CDC.
mysqlinnodbtransactions