VACUUM Statement

The VACUUM statement alone does nothing and is at present provided for PostgreSQL-compatibility. The VACUUM ANALYZE statement recomputes table statistics if they have become stale due to table updates or deletions.

Examples

No-op:

VACUUM;

Rebuild database statistics:

VACUUM ANALYZE;

Rebuild statistics for the table and column:

VACUUM ANALYZE memory.main.my_table(my_column);

Not supported:

VACUUM FULL; -- error

Reclaiming Space

The VACUUM statement does not reclaim space. For instruction on reclaiming space, refer to the “Reclaiming space” page.

Syntax

© Copyright 2018–2024 Stichting DuckDB Foundation
Licensed under the MIT License.
https://duckdb.org/docs/sql/statements/vacuum.html