DBAtlas · Database operations atlas

VACUUM ANALYZE a specific table

PostgreSQLMaintenance

Command

VACUUM (ANALYZE, VERBOSE) customer;

What it does

Cleans up dead tuples in the table, makes the space reusable and updates planner statistics.

When to use it

After bulk DELETE/UPDATE, or when query plans degrade.

Caution

VACUUM does not return disk space to the OS; reclaiming space requires VACUUM FULL, which takes an ACCESS EXCLUSIVE lock. Plain VACUUM does not block the table.

Open in DBAtlas →

Related