Description
Hey there @sylvain101010! Thank you for your great blog articles!
I have a brief question/errata about the 'Optimizing SQLite for servers' article. specifically about the 'cache_size' option.
You set it to the positive number 1000000000
i.e. 10⁹, and mention in the code comments further on that this should make the cache size one GB big.
However, in the SQLite docs, the cache_size pragma is described as:
PRAGMA schema.cache_size = pages;
PRAGMA schema.cache_size = -kibibytes;
i.e. when you specify a negative number, it will be counted in KiB and when you specify a positive number, it will be counted in pages (multiplied by the current page_size
; by default for modern SQLite that is 4096
i.e. 4KiB). So I think that your set cache size will result in a desired cache size of 4096GB rather than 1GB.
Or did I miss something in the docs maybe?