Help the planner choose better indexes.
Section: Inspect query plans
Collect statistics with ANALYZE
sql
sql
ANALYZE;Explanation
Planner statistics can improve decisions for complex queries and multiple indexes.
Learn the surrounding workflow
Compare similar commands or jump into common fixes when this command is part of a bigger troubleshooting path.
Related commands
Same sheet · prioritizing Inspect query plans