Tune SQLite caches and maintain planner statistics
This commit is contained in:
@@ -190,6 +190,10 @@ after database changes, capture these timings under the same fleet load and run
|
||||
`npm run diagnostics:database -- /data/cherry.db` inside the controller to report
|
||||
the largest tables/indexes, database and WAL sizes, and free pages. This command
|
||||
opens an existing database read-only and does not run app migrations.
|
||||
The controller uses a 128 MiB page cache and each reader worker uses 32 MiB.
|
||||
For a local data disk, set `EC_SQLITE_MMAP_MB=256` to enable memory-mapped reads.
|
||||
Query statistics are optimized at startup and hourly; WAL reuse is capped at
|
||||
64 MiB after checkpoints (active transactions can temporarily grow it larger).
|
||||
|
||||
Local controller
|
||||
metadata defaults to `./data/cherry.db`; use a separate test database when
|
||||
|
||||
Reference in New Issue
Block a user