Skip to content

series

Indexing From First Principles

Three parts on index design driven by structure rather than rules of thumb — column order, what covering an index really costs, and the case where an index is valuable because of what it leaves out.

3 parts · 10 min total

Each part starts from the physical structure of the index and derives the rule, rather than stating the rule and listing exceptions. The examples name their engine where behavior differs.

In this series

  1. Part 1: Composite Indexes: One Ordering, Not ThreeColumn order decides which queries a composite index can serve. The rule follows from the structure, and so do the cases where it does not hold. · 3 min
  2. Part 2: Covering Indexes: INCLUDE Versus Adding Key ColumnsTwo ways to make an index answer a query without touching the table. They differ in ordering, index size, and what the engine can seek on. · 3 min
  3. Part 3: Partial Indexes: What They Let You Avoid IndexingA partial index is valuable because of the rows it leaves out. The useful question is not whether it is faster, but what it stops the database from maintaining. · 4 min

Start typing to search the archive.