All jobs / Database administrator / Performance

Database administrator interview question · 0–1 years

Does the column order in a composite index matter?

The strongest answer

Yes — the index is sorted by the leading column first, so queries must filter on that leading column to use it; equality columns go first, ranges last

Why it works

Exactly — leading-column rule, and equality before range.

What a good answer covers

Answers that fall short

Who gets asked this

More Performance questions