Seif Lotfy has proposed merging lp:~zeitgeist/zeitgeist/pragma-settings into 
lp:zeitgeist.

Requested reviews:
  Zeitgeist Framework Team (zeitgeist)
Related bugs:
  #639737 Improve insertion times
  https://bugs.launchpad.net/bugs/639737


Basically I turned the lock settings to EXCLUSIVE (no harm done there)
And conditionally set journal_mode to WAL
-- 
https://code.launchpad.net/~zeitgeist/zeitgeist/pragma-settings/+merge/35833
Your team Zeitgeist Framework Team is requested to review the proposed merge of 
lp:~zeitgeist/zeitgeist/pragma-settings into lp:zeitgeist.
=== modified file '_zeitgeist/engine/sql.py'
--- _zeitgeist/engine/sql.py	2010-09-16 21:38:52 +0000
+++ _zeitgeist/engine/sql.py	2010-09-17 14:19:41 +0000
@@ -141,6 +141,11 @@
 	conn = sqlite3.connect(file_path)
 	conn.row_factory = sqlite3.Row
 	cursor = conn.cursor(UnicodeCursor)
+	if sqlite3.sqlite_version_info >= (3, 7, 0):
+		cursor.execute("PRAGMA journal_mode = WAL;")
+	cursor.execute("PRAGMA locking_mode = EXCLUSIVE;")
+	#cursor.execute("PRAGMA synchronous =NORMAL;")
+
 	
 	# Always assume that temporary memory backed DBs have good schemas
 	if constants.DATABASE_FILE != ":memory:":

_______________________________________________
Mailing list: https://launchpad.net/~zeitgeist
Post to     : zeitgeist@lists.launchpad.net
Unsubscribe : https://launchpad.net/~zeitgeist
More help   : https://help.launchpad.net/ListHelp

Reply via email to