row estimate
The planner's guess at how many rows a step of a query will produce, used to choose the plan.
In more detail
PostgreSQL's EXPLAIN ANALYZE prints estimated rows beside actual rows. A large mismatch means the planner misunderstands the data, often because its statistics are out of date, and may be choosing a poor plan; the ANALYZE command refreshes them.
Related terms
- query planner — The part of the database that turns a SQL query into a plan, choosing among indexes, scans and join orders.
- EXPLAIN — A command placed before a query that shows the plan the database would use instead of running it normally.
- selectivity — How small a fraction of rows a condition matches: a highly selective condition matches few rows.
Taught in
- Reading An EXPLAIN Plan — PostgreSQL, Indexing & Relational Data Modeling