How it works
How indexes help
They turn full-table scans into fast lookups for filters, joins, and sorts on indexed columns.
Costs
Each index adds storage and must be updated on writes, so unnecessary indexes slow inserts and updates.
Design choices
Composite and covering indexes match query patterns; column order and selectivity matter.