optimized record references deletion

This commit is contained in:
Gani Georgiev
2022-12-11 21:25:31 +02:00
parent ad321c01e0
commit 18d6a1c529
33 changed files with 150 additions and 102 deletions
+3 -3
View File
@@ -24,9 +24,9 @@ func connectDB(dbPath string) (*dbx.DB, error) {
// use a fixed connection pool to limit the SQLITE_BUSY errors
// and reduce the open file descriptors
// (the limits are arbitrary and may change in the future)
db.DB().SetMaxOpenConns(20)
db.DB().SetMaxIdleConns(20)
db.DB().SetConnMaxIdleTime(3 * time.Minute)
db.DB().SetMaxOpenConns(30)
db.DB().SetMaxIdleConns(30)
db.DB().SetConnMaxIdleTime(5 * time.Minute)
// additional pragmas not supported through the dsn string
_, err := db.NewQuery(`
+3 -3
View File
@@ -24,9 +24,9 @@ func connectDB(dbPath string) (*dbx.DB, error) {
// use a fixed connection pool to limit the SQLITE_BUSY errors and
// reduce the open file descriptors
// (the limits are arbitrary and may change in the future)
db.DB().SetMaxOpenConns(20)
db.DB().SetMaxIdleConns(20)
db.DB().SetConnMaxIdleTime(3 * time.Minute)
db.DB().SetMaxOpenConns(30)
db.DB().SetMaxIdleConns(30)
db.DB().SetConnMaxIdleTime(5 * time.Minute)
return db, nil
}