0

I am using SQLite on iOS developing.

Now I need the better performance of multithread-reading-and-writing and the robust of WAL journal mode without mmap.

As I know, WAL journal mode without mmap requires EXCLUSIVE locking mode, which may prevent multithread-reading-and-writing.

So, I wonder whether it is possible that keep SQLite in normal locking mode and wal journal mode without mmap? If yes, can you tell me a general idea for implementing this. No matter it needs to modify the source code or how difficult it is.

Ringo_D
  • 784
  • 5
  • 18
  • Why don't you want to use mmap? – CL. Oct 09 '15 at 09:36
  • hello, CL. As the [sqlite.org](http://www.sqlite.org/mmap.html) and statistics from my app said, shared-memory is easy to cause database corruption. By the way, I also see your answer at (http://stackoverflow.com/questions/23540013/sqlite-is-there-any-way-for-use-of-wal-without-mmap-function) which is similar to my question. Can you tell me more about this, please? – Ringo_D Oct 09 '15 at 09:55
  • That page talks about a different mmap() mode, and corruption is theoretically possible, not easy. Anyway, shared memory would be mapped into your process's address space, too (the other question asked about getting rid of the file). – CL. Oct 09 '15 at 10:00
  • This app has a huge number of users(ten-million level), so I should consider about the robustness more and more carefully. Is it possible If I insist not using mmap? – Ringo_D Oct 09 '15 at 10:10

0 Answers0