I know the reason why "PRAGMA mmap_size" could not improve the speed of retrieving records from ZIPVFS DB. However, I find sqlite3_soft_heap_limit64() , cache_szie and so on also which could not help improve the speed. Is all because of the ZIPVFS?
At 2015-12-23 12:34:33, "Richard Hipp" <drh at sqlite.org> wrote: >On 12/22/15, ??? <2004wqg2008 at 163.com> wrote: >> What do you mean of "render the mmap_size mote "? > >The "PRAGMA mmap_size" command sets the operating-system interface >into a mode so that at calls mmap() to read content from disk rather >than calling read(). It is often faster to use mmap() because that >avoids having to copy content from kernel space into user space. > >However, mmap() mode only works if the database is reading exactly the >same content as is present on disk. In the case of ZIPVFS, the >content on disk is compressed and encryption. The content on disk is >different from the content used by the database engine. The content >has to be converted when moving from disk into the application and >when moving from the application to the disk. Because the content in >the application is different from the content on disk, mmap() won't >work. And so when using ZIPVFS, the "PRAGMA mmap_size=NNN" command is >a no-op. > >-- >D. Richard Hipp >drh at sqlite.org >_______________________________________________ >sqlite-users mailing list >sqlite-users at mailinglists.sqlite.org >http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users