This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

classification
Title: Make sqlite3 statement cache optional
Type: enhancement Stage: resolved
Components: Extension Modules Versions: Python 3.8
process
Status: closed Resolution: rejected
Dependencies: Superseder:
Assigned To: Nosy List: berker.peksag, ghaering, palaviv, rhettinger
Priority: normal Keywords:

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:46adminsetgithub: 74457
2019-05-09 09:55:24berker.peksagsetresolution: rejected
2019-05-09 09:53:10palavivsetstatus: open -> closed

messages: + msg341976
stage: patch review -> resolved
2019-05-09 04:59:59rhettingersetnosy: + rhettinger
messages: + msg341964
2019-05-08 18:49:19berker.peksagsetmessages: + msg341927
2018-08-11 09:42:16palavivsetmessages: + msg323412
2018-07-26 06:19:47berker.peksagsetstage: patch review
messages: + msg322399
versions: + Python 3.8, - Python 3.7
2017-05-04 19:05:43palavivsetpull_requests: + pull_request1560
2017-05-04 19:03:50palavivcreate