fix: faster room joins
This commit is contained in:
parent
0823506d05
commit
75ba8bb565
3 changed files with 12 additions and 3 deletions
|
@ -49,11 +49,11 @@ impl Engine {
|
|||
fn prepare_conn(path: &Path, cache_size_kb: u32) -> Result<Connection> {
|
||||
let conn = Connection::open(&path)?;
|
||||
|
||||
conn.pragma_update(Some(Main), "page_size", &1024)?;
|
||||
conn.pragma_update(Some(Main), "page_size", &2048)?;
|
||||
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", &8000)?;
|
||||
conn.pragma_update(Some(Main), "wal_autocheckpoint", &2000)?;
|
||||
|
||||
Ok(conn)
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue