Re: [sqlite] Shared Cache vs. Serialized

2018-12-31 Thread Jesse Rittner
Keith Medcalf wrote > See also Write Ahead Logging journal mode (WAL) where in the case you > specified B's operation will succeed even if it is updating a table being > read by connection A. Oh, good to know! For anyone who stumbles across this thread in the future, note that this requires that

Re: [sqlite] Shared Cache vs. Serialized

2018-12-30 Thread Keith Medcalf
>Another interesting distinction between shared and private cache mode >I found while experimenting. Ordinarily if connection A is in the >middle of fetching result rows from a SELECT (i.e., sqlite3_step was called, >but not sqlite3_reset), and connection B tries to do a CREATE/UPDATE/DELETE, >B

Re: [sqlite] Shared Cache vs. Serialized

2018-12-30 Thread Jesse Rittner
Jens Alfke-2 wrote > But since the connections are sharing a cache, they still end up seeing > uncommitted writes. I believe this is managed by the read_uncommitted pragma . Another interesting distinction between shared and private

Re: [sqlite] Shared Cache vs. Serialized

2018-12-30 Thread Jens Alfke
> On Dec 30, 2018, at 7:52 AM, Jesse Rittner wrote: > > It > seems to me that there are two ways we can have multiple threads all > accessing a database via a "single" connection. Actually there is at least one more way: Create a global connection pool. When a thread needs to access the

Re: [sqlite] Shared Cache vs. Serialized

2018-12-30 Thread Jens Alfke
> On Dec 30, 2018, at 7:52 AM, Jesse Rittner wrote: > > One, establish a single > serialized private cache connection up front, and give it to all the > threads. Two, have each thread independently establish a multi-thread shared > cache connection. What are the trade-offs between these two

Re: [sqlite] Shared Cache vs. Serialized

2018-12-30 Thread Keith Medcalf
t that there's a Highway to Hell but only a Stairway to Heaven says a lot about anticipated traffic volume. >-Original Message- >From: sqlite-users [mailto:sqlite-users- >boun...@mailinglists.sqlite.org] On Behalf Of Jesse Rittner >Sent: Sunday, 30 December, 2018 08:53 >

[sqlite] Shared Cache vs. Serialized

2018-12-30 Thread Jesse Rittner
I've been reading about the shared cache feature and I have a question. It seems to me that there are two ways we can have multiple threads all accessing a database via a "single" connection. One, establish a single serialized private cache connection up front, and give it to all the threads. Two,