SQL Interview: Indexes, Transactions and ACID
The performance and concurrency half of a SQL interview: how indexes work, what they cost, ACID, isolation levels and deadlocks.
Structures that speed up data access.
5 notes tagged
The performance and concurrency half of a SQL interview: how indexes work, what they cost, ACID, isolation levels and deadlocks.
A practical checklist for making a slow query fast, and the specific fix for deep pagination that no amount of indexing solves.
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.
Multi column indexes and why their order decides everything: the leftmost prefix rule, selectivity, covering indexes and index only scans.
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...