Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Ability to configure SQLite cache_size #304

Closed
simonw opened this issue May 31, 2018 · 3 comments
Closed

Ability to configure SQLite cache_size #304

simonw opened this issue May 31, 2018 · 3 comments

Comments

@simonw
Copy link
Owner

simonw commented May 31, 2018

See https://www.sqlite.org/pragma.html#pragma_cache_size

Let's call the config setting cache_size_kb to emphasize that we're using the negative option.

Note this warning: perhaps we should raise an error if you try to use this setting against a SQLite version prior to 3.7.10

If the argument N is positive then the suggested cache size is set to N. If the argument N is negative, then the number of cache pages is adjusted to use approximately abs(N*1024) bytes of memory. Backwards compatibility note: The behavior of cache_size with a negative N was different in prior to version 3.7.10 (2012-01-16). In version 3.7.9 and earlier, the number of pages in the cache was set to the absolute value of N.

@simonw
Copy link
Owner Author

simonw commented May 31, 2018

I prototyped this a while ago here 04476ea before we had the --config mechanism.

@simonw simonw changed the title Ability to change SQLite cache Ability to configure SQLite cache_size Jun 3, 2018
@simonw
Copy link
Owner Author

simonw commented Jun 4, 2018

In the interest of getting this shipped, I'm going to ignore the 3.7.10 issue.

@simonw simonw closed this as completed in 29edbe9 Jun 4, 2018
@simonw
Copy link
Owner Author

simonw commented Jun 4, 2018

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant