Skip to main content

OPTIMIZE

Constant OPTIMIZE 

Source
pub const OPTIMIZE: &str = "PRAGMA optimize;";
Expand description

Re-analyse only what has gone stale (0.12.4, D-149).

SQLite tracks how much each table has changed since its last analysis and runs ANALYZE only where it believes the statistics no longer hold. A no-op when nothing has moved, which is what makes it safe to call on a schedule rather than only on demand.

Bounded by ANALYSIS_LIMIT like everything else on the connection.