mirror of
https://github.com/Foundry376/Mailspring.git
synced 2025-11-24 19:10:20 +08:00
fix(db): Use recommended page-size, cache size. Allow 80MB in RAM cache
This commit is contained in:
parent
b44ac1e2db
commit
a366f13d9a
1 changed files with 6 additions and 1 deletions
|
|
@ -16,7 +16,12 @@ class DatabaseSetupQueryBuilder
|
|||
# https://www.sqlite.org/wal.html
|
||||
# WAL provides more concurrency as readers do not block writers and a writer
|
||||
# does not block readers. Reading and writing can proceed concurrently.
|
||||
queries.push "PRAGMA journal_mode=WAL;"
|
||||
queries.push "PRAGMA journal_mode = WAL;"
|
||||
# https://www.sqlite.org/intern-v-extern-blob.html
|
||||
# A database page size of 8192 or 16384 gives the best performance for large BLOB I/O.
|
||||
queries.push "PRAGMA main.page_size = 8192;"
|
||||
queries.push "PRAGMA main.cache_size = 20000;"
|
||||
queries.push "PRAGMA main.synchronous = NORMAL;"
|
||||
|
||||
# Add table for storing generic JSON blobs
|
||||
queries.push("CREATE TABLE IF NOT EXISTS `JSONObject` (key TEXT PRIMARY KEY, data BLOB)")
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue