
Key Lookups and the Tipping Point
A nonclustered index that helps at a hundred rows can hurt at a hundred thousand. The reason is what happens after the index finds each row.
· 3 min
Databases · Queries · Operations
In-depth articles on PostgreSQL, MySQL, SQL Server, Oracle and modern data engineering — written for developers, analysts and database administrators.
latest

A nonclustered index that helps at a hundred rows can hurt at a hundred thousand. The reason is what happens after the index finds each row.
· 3 min

One comparison localizes most plan problems. Find the deepest node where the planner's estimate and reality diverge, and stop reading upward.
· 3 min

A partial index is valuable because of the rows it leaves out. The useful question is not whether it is faster, but what it stops the database from maintaining.
· 4 min

Two ways to make an index answer a query without touching the table. They differ in ordering, index size, and what the engine can seek on.
· 3 min

A plan is a tree printed upside down. Reading it in execution order instead of top to bottom turns a wall of text into a diagnosis.
· 4 min

A query run five times in a row reports the speed of memory, not of the system. Which layer answered the request is the first thing to establish.
· 3 min
Featured · sql-fundamentals
One query for the list, then one more for every item in it. The cost is per statement, which is why the profiler shows a fast database and a slow request.
2026-08-30 · 3 min
start here
series