Set journal mode, synchronous and optimize on SQLite connection
Closes #13609
This commit is contained in:
1 parent
030305ec49
commit
ab06c97ade
1 file changed
+3
@@ -523,6 +523,9 @@ class Database(DatabaseInterface):
|
||||
and logger.isEnabledFor(logging.DEBUG)):
|
||||
self._conn.set_trace_callback(logger.debug)
|
||||
self._conn.execute('PRAGMA foreign_keys = ON')
|
||||
self._conn.execute('PRAGMA journal_mode = WAL')
|
||||
self._conn.execute('PRAGMA synchronous = NORMAL')
|
||||
self._conn.execute('PRAGMA optimize')
|
||||
return self
|
||||
|
||||
def _make_uri(self):
|
||||
|
||||
Reference in new issue
Block a user