* Set the connection's `wal_autocheckpoint` interval (pages; 0 disables). * Bulk indexing defers checkpoints entirely (#1231): the default 1000-page * auto-checkpoint re-writes hot B-tree/FTS pages into the main DB file over * and over — measured at ~95% of ALL disk I/O during a bulk index,
(pages: number)
| 499 | * deferral a {@link WalCheckpointValve} bounds WAL growth off-thread. |
| 500 | */ |
| 501 | setWalAutocheckpoint(pages: number): void { |
| 502 | this.db.pragma(`wal_autocheckpoint = ${Math.max(0, Math.floor(pages))}`); |
| 503 | } |
| 504 | |
| 505 | /** |
| 506 | * `PRAGMA wal_checkpoint(PASSIVE)` on a worker thread with its own |
no test coverage detected