SQL
What Indexes Are and Why They Exist
An index is a sorted lookup structure the database maintains for you. Learn how a B-tree finds a row, what an index costs, and the clustered index in...
Single column, composite, unique and covering indexes and their cost.
3 notes
An index is a sorted lookup structure the database maintains for you. Learn how a B-tree finds a row, what an index costs, and the clustered index in...
Multi column indexes and why their order decides everything: the leftmost prefix rule, selectivity, covering indexes and index only scans.
Indexes are not free. Learn the cases where the optimiser correctly ignores them, how to find unused and duplicate indexes, and how to maintain them.