Re: [sqlite] sharing in memory db through threads

2018-11-06 Thread Wasilios Goutas
thanks for the hint to https://sqlite.org/uri.html I changed the open statement to make use of URI sqlite3_open_v2("file::memory:?cache=shared", _shared, SQLITE_OPEN_URI | SQLITE_OPEN_READWRITE, NULL ) and it works as expected :) > Wasilios Goutas hat am 5. November 2018 um 21:25 >

Re: [sqlite] sharing in memory db through threads

2018-11-05 Thread Simon Slavin
On 5 Nov 2018, at 3:28pm, Wasilios Goutas wrote: > To speed up pre-processing and importing of data I would like to grand > several threads access to the same in memory database I did not look at your source code, but you may not get the results you want. Using many threads/processes to

Re: [sqlite] sharing in memory db through threads

2018-11-05 Thread Jens Alfke
> On Nov 5, 2018, at 7:28 AM, Wasilios Goutas wrote: > > To speed up pre-processing and importing of data I would like to grand > several threads access to the same in memory database That may not help. SQLite only supports a single writer, so only one connection can open a transaction at a

Re: [sqlite] sharing in memory db through threads

2018-11-05 Thread Keith Medcalf
Did you compile sqlite3.c with SQLITE_USE_URI defined? Or use one of the methods that tells the library that you are using a URI filename? https://sqlite.org/uri.html --- The fact that there's a Highway to Hell but only a Stairway to Heaven says a lot about anticipated traffic volume.