]> git.sthu.org Git - dvrdb.git/commitdiff
Speed up sqlite access
authorStefan Huber <shuber@sthu.org>
Wed, 15 Jan 2014 10:52:41 +0000 (11:52 +0100)
committerStefan Huber <shuber@sthu.org>
Wed, 15 Jan 2014 10:52:41 +0000 (11:52 +0100)
dvr-db.py

index 320011832722c551faff7538c1dff3a46784dfa1..21f8a188d4230858a1a5c1aca6ecce6ec4f23e82 100755 (executable)
--- a/dvr-db.py
+++ b/dvr-db.py
@@ -20,6 +20,8 @@ class Database:
         self.fn = fn
         self.conn = sqlite3.connect(fn, timeout=60)
         self.conn.execute("PRAGMA foreign_keys = ON")
+        self.conn.execute("PRAGMA journal_mode = MEMORY")
+        self.conn.execute("PRAGMA synchronous = OFF")
         self.createSchema()
 
     def createSchema(self):