Blog: notes on backend, data and AI
Notes on backend engineering, data and building products with AI.
November 25, 2026 · 4 min read
Why MySQL is not using your index
You added an index and the query is still slow. The usual causes are functions on the column, type mismatches, leading wildcards, mixed collations and an optimizer that judged a scan cheaper.
mysqlindexingperformance
November 25, 2026 · 4 min read
Composite indexes and the leftmost prefix rule
A composite index is sorted by its first column, then the second, and so on. That order decides which queries it can seek, which it can sort, and which it cannot help at all.
mysqlindexingperformance
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