aboutsummaryrefslogtreecommitdiff
path: root/sources/db
diff options
context:
space:
mode:
authorJochen Topf <jochen@topf.org>2014-05-13 22:33:23 +0200
committerJochen Topf <jochen@topf.org>2014-05-13 22:33:23 +0200
commite8bd31b15ee35d4089d5fbd1a865ad9dc4abaaa4 (patch)
treee4c6f85bd8120ddbd540b03608278dd699161998 /sources/db
parent966010fc1e5c0bd257cd6c2874554476b2af1a2d (diff)
downloadtaginfo-e8bd31b15ee35d4089d5fbd1a865ad9dc4abaaa4.tar
taginfo-e8bd31b15ee35d4089d5fbd1a865ad9dc4abaaa4.tar.gz
Add pragmas to make the sqlite stuff run a little faster.
Diffstat (limited to 'sources/db')
-rwxr-xr-xsources/db/update_characters.rb6
1 files changed, 6 insertions, 0 deletions
diff --git a/sources/db/update_characters.rb b/sources/db/update_characters.rb
index 9d253d2..a729818 100755
--- a/sources/db/update_characters.rb
+++ b/sources/db/update_characters.rb
@@ -31,6 +31,12 @@ dir = ARGV[0] || '.'
db = SQLite3::Database.new(dir + '/taginfo-db.db')
db.results_as_hash = true
+db.execute("PRAGMA journal_mode = OFF");
+db.execute("PRAGMA synchronous = OFF");
+db.execute("PRAGMA count_changes = OFF");
+db.execute("PRAGMA temp_store = MEMORY;");
+db.execute("PRAGMA cache_size = 5000000;");
+
#------------------------------------------------------------------------------
regexes = [