Choose the correct description of what the VACUUM command does in PostgreSQL.
Think about how PostgreSQL manages storage after updates and deletes.
The VACUUM command cleans up dead tuples left by updates and deletes, freeing space and preventing table bloat.
Given a table users with many deleted rows, what is the expected effect of running VACUUM FULL users;?
Consider how VACUUM FULL differs from regular VACUUM.
VACUUM FULL rewrites the entire table, compacting it and reducing disk space used.
Which of the following commands correctly performs a VACUUM ANALYZE on the orders table?
Check the order of keywords in the VACUUM command.
The correct syntax is VACUUM ANALYZE table_name; to clean and update statistics.
You notice a table has grown large due to many updates and deletes. Which statement about using VACUUM versus VACUUM FULL is correct?
Think about table locking and space reclamation differences.
VACUUM FULL locks the table exclusively but reclaims more space by rewriting it. Regular VACUUM is less disruptive but reclaims less space.
After many deletes, autovacuum runs but the table size on disk does not shrink. Why does this happen?
Consider what autovacuum does versus VACUUM FULL.
Autovacuum cleans dead tuples so space can be reused but does not reduce the physical file size; only VACUUM FULL rewrites and shrinks the table.