On Wednesday, 8 March, 2017 03:45, Qiu Xiafei <qiuxia...@gmail.com> wrote:
> SQLite provide a shared-cache mode > (https://www.sqlite.org/sharedcache.html) > which will help to reduce cache size among multiple connections within a > process. But how to configure the size of the shared cache? I've tried > PRAGMA cache_size = 536870912. But no matter how much space i offered, > it seems to have no effect on memory consumption. So is there's a > configuration to set the size of shared-cache? PRAGMA cache_size sets the MAXIMUM size of the cache. So, if you have a 100MB database, the cache will never grow to be bigger than 100MB, no matter how big you set the cache_size. Why are you using SHARED_CACHE since it does not sound like you have memory constraints on cache size, which is the primary (only) reason you would ever want to use shared cache since the penalties for doing so are significant. I come to the above conclusion since you are trying to set the upper cache size limit to 2 TB. If you can afford to have 2 TB dedicated to a page cache, why do you need shared cache? _______________________________________________ sqlite-users mailing list sqlite-users@mailinglists.sqlite.org http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users