Skip to main content
PProfileMatch
← Path

Database Indexing · Composite and Covering Indexes: Column Order in Database Indexing

0 XP
  1. 1 current stop: learning
  2. 2 upcoming
  3. 3 upcoming
  4. 4 upcoming
  5. 5 upcoming

Finish after stop 5

Stop 1 of 5 · Clinic reception desk

Trick to keep in mind+3 XP

Phone book rule: surname first, so you cannot look up by first name alone.

A composite index is one list sorted by the first column, and ties broken by the second. All entries for one clinic sit together, but one date appears once inside every clinic's block. With only the date given there is no single spot to jump to, so the engine has to read the lot. The first column is the door into the index.

Read it once, then a question tests whether the trick stuck.