Name

incremental_vacuum — Activate an incremental vacuum

Common Usage

PRAGMA [database.]incremental_vacuum( pages );

Description

The incremental_vacuum pragma manually triggers a partial vacuum of a database file. If the database has auto-vacuum enabled and is in incremental mode, this pragma will attempt to release up to pages file pages. This is done by migrating them to the end of the file and truncating the file. If pages is omitted, or has a value of zero or less, the entire free list will be released.

If the database does not have auto-vacuum enabled, or is not in incremental mode, this pragma has no effect.

See Also

auto_vacuum, freelist_count, VACUUM [SQL Cmd, Ap C]

Get Using SQLite now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.