Re: [sqlite] How to configure size of shared-cache in SQLite?

2017-03-10 Thread Jens Alfke
> On Mar 10, 2017, at 3:32 PM, Simon Slavin wrote: > > Two different patterns of use. One is that the different threads/processes > usually care about different rows (maybe in different tables). In that case, > shared cache is of very little benefit. The other is when different > threads/p

Re: [sqlite] How to configure size of shared-cache in SQLite?

2017-03-10 Thread Simon Slavin
On 10 Mar 2017, at 9:34pm, Keith Medcalf wrote: > You mean physical reads? I suppose this would be possible, as long as the > working set of all your read queries are able to fit in the cache > simultaneously. If not, you are likely to get more cache thrash with the > cache being shared the

Re: [sqlite] How to configure size of shared-cache in SQLite?

2017-03-10 Thread Simon Slavin
On 10 Mar 2017, at 9:34pm, Keith Medcalf wrote: > You mean physical reads? I suppose this would be possible, as long as the > working set of all your read queries are able to fit in the cache > simultaneously. If not, you are likely to get more cache thrash with the > cache being shared the

Re: [sqlite] How to configure size of shared-cache in SQLite?

2017-03-10 Thread Keith Medcalf
On Friday, 10 March, 2017 10:57, Jens Alfke wrote: >> On Mar 9, 2017, at 7:55 AM, Keith Medcalf wrote: >> Why are you using SHARED_CACHE since it does not sound like you have >> memory constraints on cache size, which is the primary (only) reason you >> would ever want to use shared cache since

Re: [sqlite] How to configure size of shared-cache in SQLite?

2017-03-10 Thread Jens Alfke
> On Mar 9, 2017, at 7:55 AM, Keith Medcalf wrote: > > Why are you using SHARED_CACHE since it does not sound like you have memory > constraints on cache size, which is the primary (only) reason you would ever > want to use shared cache since the penalties for doing so are significant. What

Re: [sqlite] How to configure size of shared-cache in SQLite?

2017-03-09 Thread Keith Medcalf
On Wednesday, 8 March, 2017 03:45, Qiu Xiafei wrote: > SQLite provide a shared-cache mode > (https://www.sqlite.org/sharedcache.html) > which will help to reduce cache size among multiple connections within a > process. But how to configure the size of the shared cache? I've tried > PRAGMA cache_

Re: [sqlite] How to configure size of shared-cache in SQLite?

2017-03-09 Thread Clemens Ladisch
Qiu Xiafei wrote: > SQLite provide a shared-cache mode (https://www.sqlite.org/sharedcache.html) > which will help to reduce cache size among multiple connections within a > process. But how to configure the size of the shared cache? There is not special shared cache; the shared-cache mode just sh

[sqlite] How to configure size of shared-cache in SQLite?

2017-03-09 Thread Qiu Xiafei
SQLite provide a shared-cache mode (https://www.sqlite.org/sharedcache.html) which will help to reduce cache size among multiple connections within a process. But how to configure the size of the shared cache? I've tried PRAGMA cache_size = 536870912. But no matter how much space i offered, it seem