> For example, > if the writer thread starts a transaction, and one of the reader threads > does a SELECT, > would the SELECT be part of the transaction? Or are transactions per-thread > on a shared connection?
All transactions are per-connection. So yes, SELECT will be a part of transaction and you won't be able to commit or rollback the transaction until all SELECT statements are reset or finalized. Pavel On Wed, Jan 25, 2012 at 1:02 PM, Erik Fears <str...@strtok.net> wrote: > Hello, > > Right now I'm using WAL mode with a single writer, and many readers. > > At the moment, each reader is opening its own database connection. > As you can imagine, this is quite expensive. > > Instead of maintaining a pool of sqlite connections, I'd like to move every > thread to share the same connection. > > The one thing I can't figure out from documentation on sqlite.org is > whether > or not transactions are shared on the same database connection. For > example, > if the writer thread starts a transaction, and one of the reader threads > does a SELECT, > would the SELECT be part of the transaction? Or are transactions per-thread > on > a shared connection? > > Thanks! > Erik > _______________________________________________ > sqlite-users mailing list > sqlite-users@sqlite.org > http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users _______________________________________________ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users