Databases
Composite index
An index over several columns, usable for queries filtering on a leftmost prefix of them.
Why interviewers ask about it
The leftmost-prefix rule is the whole question. An index on (a, b) helps `WHERE a = ?` and `WHERE a = ? AND b = ?`, but not `WHERE b = ?`.
Related terms
This term is part of the free Python Full-Stack interview preparation module - browse the full glossary for every definition.