Planner statistics

PostgreSQL's planner chooses its plan from statistics about the data: row count, most frequent values, distribution. ANALYZE updates them, and autovacuum does so periodically. Stale statistics lead to bad estimates and therefore unsuitable plans.

Example

ANALYZE commandes;

Related concepts

The whole glossary