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

SQL
Structured Query Language โ€” the standard language for managing and querying data in relational databases.
Migration
A version-controlled change to a database schema that can be applied and reversed systematically.
Materialized View
A database object that stores the precomputed result of a query, offering faster reads at the cost of periodic refresh.
Row-Level Security (RLS)
A database feature that restricts which rows a user can access in a table based on security policies.
Stored Procedure
A precompiled collection of SQL statements stored in the database that can be executed as a single unit.
Database Proxy
A middleware server that sits between applications and databases, providing connection pooling, load balancing, and query routing.
View All Databases Terms โ†’