Recall & Review
beginner
What does the VACUUM command do in PostgreSQL?
VACUUM cleans up dead rows left behind after updates or deletes to free space and maintain database performance.
Click to reveal answer
beginner
Why is VACUUM important for database performance?
Because it removes dead rows, VACUUM prevents table bloat and keeps queries fast by allowing PostgreSQL to reuse space efficiently.
Click to reveal answer
intermediate
What is the difference between VACUUM and VACUUM FULL?
VACUUM reclaims space but does not lock tables fully; VACUUM FULL rewrites the entire table and locks it, freeing more space but with more impact.
Click to reveal answer
beginner
How does PostgreSQL handle dead rows before VACUUM runs?
Dead rows remain in the table and can slow down queries until VACUUM removes them and frees space.
Click to reveal answer
beginner
What is autovacuum in PostgreSQL?
Autovacuum is a background process that automatically runs VACUUM to keep the database clean without manual intervention.
Click to reveal answer
What problem does VACUUM solve in PostgreSQL?
✗ Incorrect
VACUUM removes dead rows left by updates or deletes to free space and improve performance.
Which VACUUM type locks the table fully and reclaims more space?
✗ Incorrect
VACUUM FULL rewrites the entire table and locks it to reclaim more space.
What is the role of autovacuum in PostgreSQL?
✗ Incorrect
Autovacuum automatically runs VACUUM to maintain database health without manual work.
What happens if you never run VACUUM on a PostgreSQL database?
✗ Incorrect
Without VACUUM, dead rows build up causing table bloat and slower queries.
Which command reclaims space but does not lock the table fully?
✗ Incorrect
VACUUM reclaims space without fully locking the table, allowing normal operations.
Explain what VACUUM does in PostgreSQL and why it is important.
Think about how updates and deletes affect storage and how VACUUM cleans that up.
You got /4 concepts.
Describe the difference between VACUUM and VACUUM FULL.
Consider how much space is freed and the impact on table availability.
You got /4 concepts.