Does anyone have any experience or examples of reducing sqlite memory usage through the pragma cache_size, page_size satements? I am misunderstanding the intended use of the pragmas?
thanks, ed On Fri, Feb 20, 2009 at 5:58 PM, ed <epdm...@gmail.com> wrote: > Hello, > I am using sqlite in an embedded environment with very limited memory. > In an attempt to reduce memory consumed by sqlite, I am executing > PRAGMA cache_size=new_size and PRAGMA default_cache_size=new_size upon > opening all of my db's, which are both file based and in-memory. I > have varied the value of new_size from 2000 (default), to 1000 to 500 > to 0 and none of these values seems to lower the amount of memory > sqlite consumes. > > I have verified the new cache size settings were registered in the > db's using PRAGMA cache_size. > I then verify sqlite memory usage with the sqlite3_status() functions, > which do not show a change in return value for > SQLITE_STATUS_PAGECACHE_OVERFLOW or SQLITE_STATUS_MEMORY_USED (around > 7.9MB and 8.2MB respectively) > > I have not changed the default memory allocation (ie no scratch, cache > or heap memory allocation at startup). > I have configured sqlite3_soft_heap_limit(8192000). > > Any help in figuring out how to limit the cache usage of memory would > be appreciated. > > -- > thanks, > ed > _______________________________________________ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users