examerioLogin
← Backend PythonQuestion 32 of 49

If PostgreSQL chooses a bad query plan because statistics are stale, what command should you run?

📘 Explanation

ANALYZE (or VACUUM ANALYZE) refreshes the planner statistics that PostgreSQL uses to choose good query plans. REINDEX, CLUSTER, and EXPLAIN ANALYZE serve different purposes and don't refresh these statistics in the way needed here.

📖 Learn: Indexes & query performance

Related questions

← PreviousNo login needed