Skip to main content

optimize_database

Function optimize_database 

Source
pub fn optimize_database()
Expand description

Run plain PRAGMA optimize on the live write connection — the periodic top-up SQLite recommends for long-lived connections (the heavy lifting is the optimize=0x10002 at connection open). Best-effort and cheap: re-analyzes only tables whose stats the planner used and that changed materially since the last run.