Issue 30271: Make sqlite3 statement cache optional (original) (raw)

Issue30271

Created on 2017-05-04 19:03 by palaviv, last changed 2022-04-11 14:58 by admin. This issue is now closed.

Pull Requests
URL Status Linked Edit
PR 1463 closed palaviv,2017-05-04 19:05
Messages (6)
msg293006 - (view) Author: Aviv Palivoda (palaviv) * Date: 2017-05-04 19:03
Currently the minimum size of the statement cache is 10. I suggest that it will be any value above 1 or no cache at all if the size is set to 0.
msg322399 - (view) Author: Berker Peksag (berker.peksag) * (Python committer) Date: 2018-07-26 06:19
Thanks for the report. What is your use case for making the statement caching optional? Did you notice any performance improvement when you use it with newer SQLite versions?
msg323412 - (view) Author: Aviv Palivoda (palaviv) * Date: 2018-08-11 09:42
I don't have any specific use case for making the statement cache optional. I expected that by changing the cache size to 0 there will be no statement cache. I think that this is a common assumption as can be seen in https://github.com/ghaering/pysqlite/issues/126#issue-346189937. rogerbinns did give a use case where we would like to disable the statement cache in https://github.com/ghaering/pysqlite/issues/126#issuecomment-410030910. I think that statement cache should be disable implicitly in that case as you suggest. The code change will be very similar and I do believe we should allow the user to disable the cache. I will be happy to open a new PR once this is merged that will disable the statement cache implicitly when calling `set_authorizer()`
msg341927 - (view) Author: Berker Peksag (berker.peksag) * (Python committer) Date: 2019-05-08 18:49
I'd prefer disabling statement cache implicitly when set_authorizer() is called. There's no need to expose this to end users.
msg341964 - (view) Author: Raymond Hettinger (rhettinger) * (Python committer) Date: 2019-05-09 04:59
> I do believe we should allow the user to disable the cache. Why?
msg341976 - (view) Author: Aviv Palivoda (palaviv) * Date: 2019-05-09 09:53
I think we can close this issue and open a different one that will disable the cache implicitly on `set_authorizer()`.
History
Date User Action Args
2022-04-11 14:58:46 admin set github: 74457
2019-05-09 09:55:24 berker.peksag set resolution: rejected
2019-05-09 09:53:10 palaviv set status: open -> closedmessages: + stage: patch review -> resolved
2019-05-09 04:59:59 rhettinger set nosy: + rhettingermessages: +
2019-05-08 18:49:19 berker.peksag set messages: +
2018-08-11 09:42:16 palaviv set messages: +
2018-07-26 06:19:47 berker.peksag set stage: patch reviewmessages: + versions: + Python 3.8, - Python 3.7
2017-05-04 19:05:43 palaviv set pull_requests: + <pull%5Frequest1560>
2017-05-04 19:03:50 palaviv create