diff --git a/src/cuirass/database.scm b/src/cuirass/database.scm index 8b83c18..fb037d1 100644 --- a/src/cuirass/database.scm +++ b/src/cuirass/database.scm @@ -403,7 +403,9 @@ a critical section that allows database operations to be serialized." ;; be costly and may defeat statement caching. (parameterize ((%db-channel (make-critical-section db))) body ...) - (db-close db)))) + (begin + (sqlite-exec db "PRAGMA optimize;") + (db-close db))))) (define* (read-quoted-string #:optional (port (current-input-port))) "Read all of the characters out of PORT and return them as a SQL quoted