Sachin Gupta <scgu...@ipolicynetworks.com> wrote: > Our application is kind of heavily multi-threaded and required using sqlite > to be used as an in memory database for caching > purposes. Being multi-threaded requires read-write locking mechanism, and WAL > seemed quite the thing for us. We are expecting > high rate of Inserts and Selects simultaneously.
WAL, and journaling in general, arbitrates concurrent access between multiple connections to the same database. You cannot have more than one connection to the same in-memory database. Ergo, journaling mode, WAL or otherwise, is irrelevant for you. > Q. Well since WAL cannot be used with in-memory database, which other method > do you all suggest one should use for providing > better concurrency? Better than what? SQLite would happily allow you to modify the database at the same time you are stepping through a SELECT statement (but it won't let two modification statements to run simultaneously). Of course, if you modify the same data that you are selecting against, the result of the select is unpredictable. > Can using Shared Cache Mode be of use? http://www.sqlite.org/sharedcache.html Again, shared cache mode presupposes the existence of more than one connection to the same database (otherwise, what would share the cache?) And again, you can only have one connection to the same in-memory database. -- Igor Tandetnik _______________________________________________ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users