technotes · topic
First-principles depth — the clustered index, query planning, transactions, locking & replication.
The table is a B+tree by primary key — so a secondary read is a double lookup, and PK choice is a storage decision.
doneA composite index is a phone book — only leftmost prefixes are searchable, so column order is a design decision.
doneGrade any plan in one pass: access type, key, rows × filtered, Extra — plus EXPLAIN ANALYZE for estimates vs reality.
doneFunctions on columns, leading wildcards, type mismatches, low selectivity — why a perfect index still gets skipped.
plannedEXPLAIN plan, a
slow query, or a fuzzy concept to your session and we'll dissect it together.