On 31 Aug 2016, at 9:39am, sanhua.zh <sanhua...@foxmail.com> wrote: > Yes. even on iDevice, [mmap] can get faster than sequential I/O. Sometime it > will be twice faster.
Unless your users have complained about speed, this does not matter. There is no need to make everything happen as fast /as possible/. Try using just standard SQLite and find out if it is fast /enough/. Then you don't have to spend lots of programming time learning tiny little details about one small piece of a software library. > Simon Won't the standard SQLite API do the job well enough ? > I did use the standard SQLite API. It maps the whole db file into address > space. It does this only if you have told it to. According to <https://www.sqlite.org/mmap.html> "To activate memory-mapped I/O, use the mmap_size pragma and set the mmap_size to some large number" So do not do this and SQLite will stop trying to memory map the file. But it is possible that you are using a SQLite library which has a default memory map size. Can you execute the command "PRAGMA mmap_size" and tell what it outputs ? If the result is not zero or blank, you can disable memory mapping using the command "PRAGMA mmap_size=0" after you have opened the database. Please try this and see whether your application still crashes. Simon. _______________________________________________ sqlite-users mailing list sqlite-users@mailinglists.sqlite.org http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users