PostgreSQL 18 · Performance and maintenance
Vacuum and update statistics
Reclaim dead rows and refresh the planner's statistics for a table.
VACUUM (ANALYZE) users;
Official PostgreSQL 18 documentation
More performance and maintenance commands
- See how a query runs
- Create an index
- Create an index without blocking writes
- See running queries
- Cancel a running query
All performance and maintenance commands · PostgreSQL 18 cheatsheet