diff --git a/src/ssb.db.c b/src/ssb.db.c index d075f2a7..ffcfdb7a 100644 --- a/src/ssb.db.c +++ b/src/ssb.db.c @@ -503,6 +503,10 @@ void tf_ssb_db_init(tf_ssb_t* ssb) tf_printf("Adding flags column.\n"); _tf_ssb_db_exec(db, "ALTER TABLE messages ADD COLUMN flags INTEGER"); } + + tf_printf("Optimizing...\n"); + _tf_ssb_db_exec(db, "PRAGMA optimize=0x10002"); + tf_printf("Done optimizing.\n"); tf_ssb_release_db_writer(ssb, db); }