PostgreSQL Performance Cheat Sheet/Vacuum analyze one table

Vacuum and refresh planner stats in one command.

Section: Vacuum, Analyze, and Maintenance

Vacuum analyze one table

sql
sql
VACUUM (ANALYZE) public.users;
Explanation

See summary for usage details.

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 Vacuum, Analyze, and Maintenance
Vacuum one table
Reclaim dead tuples and maintain visibility data.
OpenIn sheetsqlsame section
VACUUM FULL table
Rewrite a bloated table more aggressively.
OpenIn sheetsqlsame section
Analyze verbose
Show extra detail while updating planner statistics.
OpenIn sheetsqlsame section
Reindex table
Rebuild all indexes on a table.
OpenIn sheetsqlsame section
Show autovacuum setting
Check whether autovacuum is enabled.
OpenIn sheetsqlsame section
EXPLAIN ANALYZE
Run the query and show actual timing and buffer usage.
OpenIn sheetsql1 tag match