John Stanton wrote:
Richard Klein wrote:
John Stanton wrote:
Using a single Sqlite connection for each database and holding the
connection open means that maximum effect is obtained from Sqlite's
cache.
>
Why is that? Is there a separate cache (I hope not!) for each
connection?
Thanks,
- Richard (new to the group)
Yes, each connection has a cache. A lot of concurrent connections means
a lot of memory allocated to cache and potentially a lot of duplicated
cached items. See shared cache mode for relief.
Follow this thread for reasons why the approach above is not a valid
solution.
I should have mentioned that I am using SQLite version 2.8.17, so shared
cache mode is not even an option for me. However, it appears that I would
not be able to use it anyway, since only connections opened by the same
thread can share a cache. I want to be able to share a cache between two
different threads.
Was it true even in version 2 that each connection had its own cache?
I was hoping that the simpler concurrency model in version 2 would
allow the sharing of a single cache between two different threads.
Regards,
- Richard
-----------------------------------------------------------------------------
To unsubscribe, send email to [EMAIL PROTECTED]
-----------------------------------------------------------------------------