๐ŸŽ New User? Get 20% off your first purchase with code NEWUSER20 ยท โšก Instant download ยท ๐Ÿ”’ Secure checkout Register Now โ†’
Menu

Categories

Databases Advanced

What is Vacuum?

A PostgreSQL maintenance operation that reclaims storage from dead tuples and updates statistics for the query planner.

PostgreSQL's MVCC creates dead tuples when rows are updated or deleted. VACUUM marks this space for reuse (but does not return it to the OS). VACUUM FULL rewrites the entire table, recovering disk space but requiring an exclusive lock.

Autovacuum runs automatically based on configurable thresholds. ANALYZE updates statistics used by the query planner. Proper vacuum configuration is critical for maintaining database performance and preventing table bloat.

Related Terms

Foreign Key
A column that creates a link between two tables by referencing the primary key of another table.
Full-Text Search
A technique for searching natural language text in databases using word stemming, ranking, and relevance scoring.
SQL
Structured Query Language โ€” the standard language for managing and querying data in relational databases.
Database Connection Pooling
A technique that maintains a cache of database connections for reuse, reducing the overhead of creating new connections.
Write-Ahead Log (WAL)
A technique where changes are first written to a log before being applied to the database, ensuring crash recovery and data integrity.
Elastic Search
A distributed search and analytics engine built on Apache Lucene, optimized for full-text search and log analysis.
View All Databases Terms โ†’