mirror of
https://github.com/louislam/uptime-kuma.git
synced 2025-07-20 21:48:54 -04:00
[Experiment] Use incremental vacuum to speed up delete? (#2800)
* DB: Use incremental vacuum * Chore: Add log for delete monitor exec. time * WIP: Test synchronous NORMAL
This commit is contained in:
parent
eaee55fc8f
commit
a386f1fc9e
2 changed files with 8 additions and 2 deletions
|
@ -169,12 +169,12 @@ class Database {
|
|||
await R.exec("PRAGMA journal_mode = WAL");
|
||||
}
|
||||
await R.exec("PRAGMA cache_size = -12000");
|
||||
await R.exec("PRAGMA auto_vacuum = FULL");
|
||||
await R.exec("PRAGMA auto_vacuum = INCREMENTAL");
|
||||
|
||||
// This ensures that an operating system crash or power failure will not corrupt the database.
|
||||
// FULL synchronous is very safe, but it is also slower.
|
||||
// Read more: https://sqlite.org/pragma.html#pragma_synchronous
|
||||
await R.exec("PRAGMA synchronous = FULL");
|
||||
await R.exec("PRAGMA synchronous = NORMAL");
|
||||
|
||||
if (!noLog) {
|
||||
log.info("db", "SQLite config:");
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue