[sqlite] sharing in memory db through threads

2018-11-05 Thread Wasilios Goutas
Hi, I try to use an in memory database which works as long as I use as db path ":memory:". To speed up pre-processing and importing of data I would like to grand several threads access to the same in memory database and have found the documentation on https://www.sqlite.org/inmemorydb.html

Re: [sqlite] [EXTERNAL] sharing in memory db through threads

2018-11-05 Thread Hick Gunter
Have you enabled URI filenames? See https://www.sqlite.org/uri.html for details -Ursprüngliche Nachricht- Von: sqlite-users [mailto:sqlite-users-boun...@mailinglists.sqlite.org] Im Auftrag von Wasilios Goutas Gesendet: Montag, 05. November 2018 16:28 An:

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 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.

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] Parallel reading can be slow on APFS

2018-11-05 Thread Rowan Worth
"The problem will affect you only if you have multiple reads/writes happening at the same time." ie. The problem will only manifest if the user is doing anything at all with their computer? :P Interesting analysis - thanks for sharing. -Rowan On Tue, 30 Oct 2018 at 10:13, Simon Slavin wrote: