[prev in list] [next in list] [prev in thread] [next in thread] 

List:       sqlite-users
Subject:    Re: [sqlite] advantages of Not using shared cache mode
From:       Roger Binns <rogerb () rogerbinns ! com>
Date:       2009-11-25 20:18:03
Message-ID: 4B0D90FB.6000306 () rogerbinns ! com
[Download RAW message or body]

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Nicolas Rivera wrote:
> In trying to understand shared cache mode, I would like to know why one 
> would Not use it.

It is not useful unless you open the same database multiple times
concurrently within the same process.  Then it only saves you time and I/O
if the queries in different connections are doing substantially the same
thing as they would access the same database pages.  If for example the
queries were accessing different tables then there would be no cache sharing
- - you may as well have used two different connections.  Your operating
system also comes with caching functionality so the SQLite cache may not buy
you that much any way.  Finally shared cache mode does not behave the same
with busy handlers - they are not called and you to have implement the same
functionality in your own code.

  http://www.sqlite.org/src/tktview/ebde3f66fc64e21e61ef2854ed1a36dfff884a2f

In my documentation I specifically advise against shared cache mode:

  http://apsw.googlecode.com/svn/publish/tips.html#shared-cache-mode

Roger
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.9 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iEYEARECAAYFAksNkPYACgkQmOOfHg372QT4lgCgjbflFeTOT1OqBm8iC2AdpuxL
LtEAoOW9LRvNfbXOX6twCwkKsFy0Vx70
=94qg
-----END PGP SIGNATURE-----
_______________________________________________
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic