I find I confused several concepts of memory. Sorry for that. And I guess I finally understand what my question really is:
Still there is only one process doing a SELECT * in a 256M db file. Then 256M physical memory should be used when doing the query. (Ignore the cache_size.) So the PSS of my program should be 256M at that time. That is OK. But from now on, the PSS will be 256M for a long time as my process will be active for hours doing insert-select-insert-select without closing. My system can not afford a 256M-PSS program. In another word, the most important thing is there is no opportunity to call unmmap() in my program. Can I find a reasonable time to call unmmap or sqlite3OsUnfetch? Or is there any way to solve the problem other than pragma mmap_size=2M? Really thanks for your help. -- Sent from: http://sqlite.1065341.n5.nabble.com/ _______________________________________________ sqlite-users mailing list sqlite-users@mailinglists.sqlite.org http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users