Database Indexes: Query Plans and Statistics - Part 2
Understanding how databases choose between index seeks and table scans, how statistics influence query execution plans, and why cached plans can sometimes go wrong.
Welcome to my little corner of the internet. I write about software
engineering, ideas worth exploring, and experiences that shape how I see
the world.
No noise, no algorithms. Just things I learn, think about, and find
worth sharing.
Understanding how databases choose between index seeks and table scans, how statistics influence query execution plans, and why cached plans can sometimes go wrong.
A first-principles look at database pages, B+ trees, clustered and nonclustered indexes, key lookups, and why an index seek is not always faster than a scan.