Skip to content
About
Main content

An index entry is a pair with four dials

Which four independent choices define every index entry, and what single tension sits under all of them?

Every index entry is a pair: a key and a reference. Four independent choices define the pair, and every item in this article is a position on one of four dials.

  1. What is the key? A stored column, a tuple of columns, or a computed function of the row.
  2. What does the reference point at? A physical address, a logical identity, the row itself, or nothing at all.
  3. Which rows get an entry? All of them, a filtered subset, or every Nth.
  4. What else rides in the entry? Nothing, or extra payload columns.
DialChoices covered here
1. Keycomposite, expression
2. Reference targetprimary/secondary, clustered/non-clustered
3. Rows that get entriespartial, sparse (and )
4. Payloadcovering, INCLUDE

They are orthogonal. A partial, covering, composite is a coherent thing, not a contradiction, and several of the best real indexes are exactly that.

The tension under all four is a single tension. An index entry is a copy of information. The more it copies, the more queries it can answer without touching the table, and the more writes it must intercept to stay true.