1
0
Fork 0
mirror of https://gitlab.com/famedly/conduit.git synced 2024-09-12 01:09:11 +02:00

Merge branch 'efficient-sqlite' into 'next'

improvement: more efficient sqlite

See merge request famedly/conduit!199
This commit is contained in:
Timo Kösters 2021-09-14 07:23:02 +00:00
commit b64538c6f1

View file

@ -56,7 +56,7 @@ impl Engine {
conn.pragma_update(Some(Main), "journal_mode", &"WAL")?;
conn.pragma_update(Some(Main), "synchronous", &"NORMAL")?;
conn.pragma_update(Some(Main), "cache_size", &(-i64::from(cache_size_kb)))?;
conn.pragma_update(Some(Main), "wal_autocheckpoint", &2000)?;
conn.pragma_update(Some(Main), "wal_autocheckpoint", &0)?;
Ok(conn)
}
@ -77,7 +77,7 @@ impl Engine {
pub fn flush_wal(self: &Arc<Self>) -> Result<()> {
self.write_lock()
.pragma_update(Some(Main), "wal_checkpoint", &"TRUNCATE")?;
.pragma_update(Some(Main), "wal_checkpoint", &"RESTART")?;
Ok(())
}
}