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

Database Constraint
Rules enforced by the database to maintain data integrity, including NOT NULL, UNIQUE, CHECK, PRIMARY KEY, and FOREIGN KEY.
Connection String
A formatted string containing all parameters needed to establish a connection to a database server.
PostgreSQL
An advanced open-source relational database known for its reliability, feature richness, and standards compliance.
CTE (Common Table Expression)
A temporary named result set defined within a SQL statement using the WITH clause, improving query readability and enabling recursion.
Redis
An open-source, in-memory data store used as a database, cache, message broker, and queue with sub-millisecond response times.
Database Backup
The process of creating copies of database data to protect against data loss from failures, corruption, or human error.
View All Databases Terms โ†’