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.
I have my monitor system to check the lag and delay. I can make sure that I 
must make it faster.



PRAGMA mmap_size=0x7fff0000
I am using SQLite for a long time, and be familiar with the most of the source 
code. So you have no need to worry about the basic things.


BTW, what do you think if I mapseparatly instead of the whole db file, which is 
the way I mentioned before ?




原始邮件
发件人:Simon slavinslav...@bigfraud.org
收件人:SQLite mailing listsqlite-us...@mailinglists.sqlite.org
发送时间:2016年8月31日(周三) 18:04
主题:Re: [sqlite] Why MMAP return ENOMEM in SQLite?


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
_______________________________________________
sqlite-users mailing list
sqlite-users@mailinglists.sqlite.org
http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users

Reply via email to