From 537e06ef50963df4de17bd1ba8f7cb137670c4f6 Mon Sep 17 00:00:00 2001 From: Ben Wilson Date: Mon, 22 Jan 2024 17:34:46 -0500 Subject: [PATCH] turn back cache sizes to default for sqlite --- src/services/app.service.ts | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/src/services/app.service.ts b/src/services/app.service.ts index 6897424..78fc73f 100644 --- a/src/services/app.service.ts +++ b/src/services/app.service.ts @@ -20,13 +20,14 @@ export class AppService implements OnModuleInit { // if (process.env.NODE_APP_INSTANCE == '0') { // await this.dataSource.query(`VACUUM;`); // } + //https://phiresky.github.io/blog/2020/sqlite-performance-tuning/ - //500 MB DB cache - await this.dataSource.query(`PRAGMA cache_size = -500000;`); + // //500 MB DB cache + // await this.dataSource.query(`PRAGMA cache_size = -500000;`); //Normal is still completely corruption safe in WAL mode, and means only WAL checkpoints have to wait for FSYNC. await this.dataSource.query(`PRAGMA synchronous = off;`); - //6Gb - await this.dataSource.query(`PRAGMA mmap_size = 6000000000;`); + // //6Gb + // await this.dataSource.query(`PRAGMA mmap_size = 6000000000;`); } @Interval(1000 * 60 * 60)