Skip to main content

Composite Index & Leftmost Prefix

Learn Composite Index & Leftmost Prefix (Indexes, MySQL) with worked examples, diagrams and interview questions. Free on JavaSchoolLab.

Introduction A composite (multi-column) index sorts entries by the first column, then the second within equal firsts, and so on, like a phone book sorted by last name then first name. The leftmost-prefix rule : it can serve predicates on (a), (a,b), (a,b,c), but not (b) or (c) alone.

More lessons in Indexes