projects
/
platform
/
upstream
/
ibus-libpinyin.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
209e5a8
)
Optimize sqlite for better performance.
author
Peng Huang
<shawn.p.huang@gmail.com>
Mon, 4 Jan 2010 00:25:41 +0000
(08:25 +0800)
committer
Peng Huang
<shawn.p.huang@gmail.com>
Mon, 4 Jan 2010 00:25:41 +0000
(08:25 +0800)
src/Database.cc
patch
|
blob
|
history
diff --git
a/src/Database.cc
b/src/Database.cc
index
39a3b87
..
a5f78f9
100644
(file)
--- a/
src/Database.cc
+++ b/
src/Database.cc
@@
-92,6
+92,12
@@
Database::init (void)
/* Using memory for temp store */
m_sql << "PRAGMA temp_store=MEMORY;\n";
+ /* Set journal mode */
+ m_sql << "PRAGMA journal_mode=TRUNCATE;\n";
+
+ /* Set the sync mode */
+ m_sql << "PRAGMA synchronous=NORMAL;\n";
+
/* Using EXCLUSIVE locking mode on main database
* for better performance */
m_sql << "PRAGMA main.locking_mode=EXCLUSIVE;\n";