
Estimated Versus Actual Rows: the First Number to Check
One comparison localizes most plan problems. Find the deepest node where the planner's estimate and reality diverge, and stop reading upward.
· 3 min
articles
Every article on SQLPress — query performance, database internals, operations and the day-to-day craft of working with data.
14 articles

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

SQLite's default journal blocks readers during a write. WAL mode does not, and that single difference decides whether SQLite suits a concurrent service.
· 2 min

Relational modeling describes the entities and lets queries follow. Document modeling inverts that, and the inversion is the whole trade.
· 4 min

Past the point where the server can execute work in parallel, adding connections adds queueing rather than throughput — and moves the queue somewhere worse.
· 4 min

Column order decides which queries a composite index can serve. The rule follows from the structure, and so do the cases where it does not hold.
· 3 min

InnoDB stores the table inside its primary key. Almost every MySQL indexing consequence, good and bad, follows from that single decision.
· 3 min

Transaction pooling is what makes PgBouncer worth deploying, and it silently removes session state your application may depend on.
· 3 min

Which variant you ran decides whether the numbers in front of you are the planner's estimate or a measurement, and whether the pages came from cache.
· 4 min