mirror of
https://github.com/benjamin-wilson/public-pool.git
synced 2025-03-17 13:21:43 +01:00
turn back cache sizes to default for sqlite
This commit is contained in:
parent
300fd99067
commit
537e06ef50
@ -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)
|
||||
|
Loading…
x
Reference in New Issue
Block a user