
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
category
Query planning, indexing, extensions, replication and day-to-day operations on PostgreSQL.
7 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

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

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

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

An index the planner ignores is usually a row-estimate problem. The fix starts with what the optimizer expected, not with the index definition.
· 3 min