Remember to optimize the database

This commit is contained in:
Přemysl Eric Janouch 2024-12-29 12:32:44 +01:00
parent e895beadb7
commit ca462ac005
Signed by: p
GPG Key ID: A0420B94F92B9493

View File

@ -2700,6 +2700,9 @@ func main() {
// Note that the database object has a closing finalizer,
// we just additionally print any errors coming from there.
if db != nil {
if _, err := db.Exec(`PRAGMA optimize`); err != nil {
log.Println(err)
}
if err := db.Close(); err != nil {
log.Println(err)
}