Skip to content

sql: enable shared cache - #2356

Merged
link2xt merged 1 commit into
masterfrom
sharedcache
Apr 17, 2021
Merged

link2xt merged 1 commit into
masterfrom
sharedcache

Conversation

@link2xt

@link2xt link2xt commented Apr 17, 2021

Copy link
Copy Markdown
Collaborator

This is based on #2355, which should be merged in first.

Fixes #2353

I am not sure about safety of PRAGMA read_uncommitted=1;, but it is suggested by https://sqlite.org/sharedcache.html and I get "table locked" errors otherwise. I think it should not cause significant issues because we usually don't commit many rows in a single transaction and don't rely on them being either written or not at the same time during reading.

@link2xt
link2xt requested a review from r10s April 17, 2021 03:42
@link2xt link2xt mentioned this pull request Apr 17, 2021
@link2xt
link2xt marked this pull request as ready for review April 17, 2021 19:37
@link2xt

link2xt commented Apr 17, 2021

Copy link
Copy Markdown
Collaborator Author

Benchmark of opening the database and searching for "hello" 10 times in my Desktop database:
1

@r10s r10s left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm and make sense to me :)

@r10s

r10s commented Apr 17, 2021

Copy link
Copy Markdown
Contributor

nice graphics!

@link2xt
link2xt merged commit 9a34fe5 into master Apr 17, 2021
@link2xt
link2xt deleted the sharedcache branch April 17, 2021 20:47
@link2xt link2xt mentioned this pull request Apr 18, 2021
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

Successfully merging this pull request may close these issues.

performance degradation

2 participants