๐ŸŽ 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

Elastic Search
A distributed search and analytics engine built on Apache Lucene, optimized for full-text search and log analysis.
ACID
A set of four properties (Atomicity, Consistency, Isolation, Durability) that guarantee reliable database transactions.
Window Function
An SQL function that performs calculations across a set of rows related to the current row without collapsing the result set.
Soft Delete
A pattern where records are marked as deleted with a flag or timestamp rather than being physically removed from the database.
Redis
An open-source, in-memory data store used as a database, cache, message broker, and queue with sub-millisecond response times.
Migration
A version-controlled change to a database schema that can be applied and reversed systematically.
View All Databases Terms โ†’