From a1a45f50bf7e978545fec2820f86290e7028b415 Mon Sep 17 00:00:00 2001 From: James Seibel Date: Thu, 4 Apr 2024 07:50:02 -0500 Subject: [PATCH] Change Sqlite Journaling to WAL to potentially improve concurrent performance --- .../sqlScripts/0031-sqlite-useSqliteWalJournaling.sql | 8 ++++++++ core/src/main/resources/sqlScripts/scriptList.txt | 1 + 2 files changed, 9 insertions(+) create mode 100644 core/src/main/resources/sqlScripts/0031-sqlite-useSqliteWalJournaling.sql diff --git a/core/src/main/resources/sqlScripts/0031-sqlite-useSqliteWalJournaling.sql b/core/src/main/resources/sqlScripts/0031-sqlite-useSqliteWalJournaling.sql new file mode 100644 index 000000000..1c48df1c7 --- /dev/null +++ b/core/src/main/resources/sqlScripts/0031-sqlite-useSqliteWalJournaling.sql @@ -0,0 +1,8 @@ + +-- these PRAGMA's will automatically commit, so we have to disable +-- DH's automatic transactions, otherwise the connection will throw an error + +--No Transactions-- + +pragma journal_mode = WAL; +pragma synchronous = NORMAL; diff --git a/core/src/main/resources/sqlScripts/scriptList.txt b/core/src/main/resources/sqlScripts/scriptList.txt index 9899c9e0a..62901d865 100644 --- a/core/src/main/resources/sqlScripts/scriptList.txt +++ b/core/src/main/resources/sqlScripts/scriptList.txt @@ -2,4 +2,5 @@ 0010-sqlite-createInitialDataTables.sql 0020-sqlite-createFullDataSourceV2Tables.sql 0030-sqlite-changeTableJournaling.sql +0031-sqlite-useSqliteWalJournaling.sql 0040-sqlite-removeRenderCache.sql