thinQmaster Virtual testing partner Adaptive practice exams that find your weak spots and drill them. Every answer explained. From $69
Enroll

thinQmaster

Find your exam

Five questions free, before you decide.

Step 1 · choose a vendor

In one of our camps? Your practice exams come with the tuition — they are on your study page already.

Data & Analytics · Advanced

Leftmost Prefix Rule

The principle that a composite index can be used for seeks only when queries filter on its leading column(s).

Definition

For an index on (A, B, C), predicates on A, on A and B, or on A, B and C can seek; predicates on B or C alone cannot (some engines offer skip scans). The same idea applies to clustering keys and sort keys in analytic databases.

Exam tip

Ask which index serves a WHERE on column B: one that starts with B, not one where B is second.

Related terms