Skip to content

Commit b436895

Browse files
committed
feat: enable sqlite optimization during close
1 parent 89ade6a commit b436895

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/db/connection.rs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,8 @@ impl Connection {
2121
.create_if_missing(true)
2222
.journal_mode(SqliteJournalMode::Wal)
2323
.synchronous(SqliteSynchronous::Normal)
24-
.foreign_keys(true);
24+
.foreign_keys(true)
25+
.optimize_on_close(true, 400);
2526

2627
let pool = SqlitePoolOptions::new()
2728
.min_connections(1)

0 commit comments

Comments
 (0)