I am (still) working on an iPhone program which uses SQLite3. I have managed to optimize the database writes as far as I can.
The problem I have now is that "END TRANSACTION" is killing me as it's taking very long. The journal file is usually about 50k which might be a problem, but I'd like to know your ideas.
I tried using "PRAGMA synchronous = 0", but that caused some data corruption. My latest attempt at optimizing is "PRAGMA journal_mode=TRUNCATE" but I do not know if that helps a lot.
Any suggestions at this stage?
Have you tried the in memory journaling?
"PRAGMA journal_mode=MEMORY"
That was one of the most significant performance boosts for us.
If that is not quite fast enough yet, try the memsys5 stuff. http://www.sqlite.org/compile.html#enable_memsys5
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.