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

Row-Level Security (RLS)
A database feature that restricts which rows a user can access in a table based on security policies.
Crosstab Query
A query that transforms rows into columns, creating a pivot table view of aggregated data.
NoSQL
A category of databases that store data in non-tabular formats, optimized for specific data models and access patterns.
Prepared Statement
A pre-compiled SQL template that uses parameters instead of literal values, preventing SQL injection and improving performance.
Connection String
A formatted string containing all parameters needed to establish a connection to a database server.
Database Index Types
Different index structures (B-tree, Hash, GIN, GiST, BRIN) optimized for various query patterns and data types.
View All Databases Terms โ†’