[sqlite] Performance of newer versions

2016-01-12 Thread Sergej Jurečko
Something I've recently noticed when using SQLite over multiple threads (with SQLITE_THREADSAFE=2). You must disable memstatus (with -DSQLITE_DEFAULT_MEMSTATUS=0) otherwise that mutex will cause a lot of contention. Sergej

[sqlite] Performance of newer versions

2016-01-12 Thread Clemens Ladisch
Simon Slavin wrote: > More recent versions introduced another mode (WAL) > in which any number of queries can take place without locking the database. That would be file locking, not a critical section. This appears to be a problem with using the SQLite C API. Regards, Clemens

[sqlite] Performance of newer versions

2016-01-12 Thread Clemens Ladisch
Gheorghe Marinca wrote: > the library seemed to held, be contended on an internal lock (critical > section). Which lock? This probably happens when you are using the same database connection from multiple threads, or multiple connections in shared-cache mode. Neither one is something that you sh

[sqlite] Performance of newer versions

2016-01-12 Thread Simon Slavin
On 12 Jan 2016, at 7:40am, Gheorghe Marinca wrote: > We have used in an older product a version of sqllite from 7-8-9 years ago. I > oserved that (this being used on a server) when doing sql queries the library > seemed to held, be contended on an internal lock (critical section). Do the > n

[sqlite] Performance of newer versions

2016-01-12 Thread Gheorghe Marinca
Hi, We have used in an older product a version of sqllite from 7-8-9 years ago. I oserved that (this being used on a server) when doing sql queries the library seemed to held, be contended on an internal lock (critical section). Do the newer versions improve on this or for reading there are al