Sfoglia il codice sorgente

webUI: enable sqlite auto vacuum

Nick Peng 1 mese fa
parent
commit
fed4570ac1
1 ha cambiato i file con 6 aggiunte e 0 eliminazioni
  1. 6 0
      plugin/smartdns-ui/src/db.rs

+ 6 - 0
plugin/smartdns-ui/src/db.rs

@@ -381,9 +381,15 @@ impl DB {
         conn.as_ref()
             .unwrap()
             .execute("PRAGMA temp_store = MEMORY", [])?;
+        conn.as_ref()
+            .unwrap()
+            .execute("PRAGMA auto_vacuum = FULL", [])?;
         conn.as_ref()
             .unwrap()
             .query_row("PRAGMA journal_mode = WAL", [], |_| Ok(()))?;
+        conn.as_ref()
+            .unwrap()
+            .query_row("PRAGMA wal_autocheckpoint = 50000", [], |_| Ok(()))?;
         Ok(())
     }