Hi,

I am using sqlite version 3.7.13 in a multithreaded application
(transactions with writes and reads will be called from different parallel
threads within one process), and I am trying to gain performance.  I would
also like in some way to keep an on disk record of the database as the
program runs, and am working with an existing database structure that uses
the shared cache/unlock_notify mechanisms to handle concurrency, opening a
separate database connection per each thread (I cannot modify these
settings).

I have been attempting to do the following: For every write operation, write
to an in memory database, then perform that same write to a separate on disk
database with the asynchronous io module vfs attached to it.  The on disk
database also sets locking_mode to exclusive and journal_mode to WAL.  Reads
will just happen on the in-memory database.  This combination of
configurations for the on disk database has given me almost in memory write
speeds.  I have not set the sqlite3async vfs as the default for all db
connections in sqlite3async_initialize().  I have just attached the
sqlite3async vfs to on disk database connections, not the in memory ones. 
However, I get the error: "no such access mode : memory" when I try to begin
any transaction for the in memory database.  How do I fix this?

As an alternative, is it safe to just use the on disk database with the
configurations/additions listed above for all read/write operations?  If I
do inserts/updates and query for those same inserts/updates right after,
will those inserts/updates be reflected in the query results or could those
writes still be somewhere in the write operation queue or a different place
in cache/WAL file?

Thanks for any help.  All suggestions are more than welcome.



--
View this message in context: 
http://sqlite.1065341.n5.nabble.com/MultiThread-Performance-Gain-Attempts-tp63796.html
Sent from the SQLite mailing list archive at Nabble.com.
_______________________________________________
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

Reply via email to