Re: [sqlite] Multiple Independent Database Instances

2019-04-25 Thread Tommy Lane
, 2019 17:33 > To: sqlite-users@mailinglists.sqlite.org > Subject: Re: [sqlite] Multiple Independent Database Instances > >> How does each thread know whether the file has been "previously > processed" or not? > > > The paths are pushed onto a queue and

Re: [sqlite] Multiple Independent Database Instances

2019-04-22 Thread Keith Medcalf
>To: sqlite-users@mailinglists.sqlite.org >Subject: Re: [sqlite] Multiple Independent Database Instances > >> How does each thread know whether the file has been "previously >processed" or not? > > >The paths are pushed onto a queue and each thread pops the

Re: [sqlite] Multiple Independent Database Instances

2019-04-22 Thread Simon Slavin
On 23 Apr 2019, at 12:32am, Lee, Jason wrote: > The current code is effectively just an sqlite3_open_v2 followed by an > sqlite3_close Then either your code is faulty, and doesn't actually do this, or your problem has nothing to do with SQLite. SQLite doesn't open a database file when you

Re: [sqlite] Multiple Independent Database Instances

2019-04-22 Thread Lee, Jason
___ From: sqlite-users on behalf of James K. Lowden Sent: Monday, April 22, 2019 4:53:42 PM To: sqlite-users@mailinglists.sqlite.org Subject: Re: [sqlite] Multiple Independent Database Instances On Mon, 22 Apr 2019 21:25:31 + "Lee, Jason" wrote: > I have a set of several mi

Re: [sqlite] Multiple Independent Database Instances

2019-04-22 Thread James K. Lowden
On Mon, 22 Apr 2019 21:25:31 + "Lee, Jason" wrote: > I have a set of several million database files sitting on my > filesystem. Each thread will open a previously unprocessed database > file, do some queries, close the database, and move on to the next > unprocessed database file.

Re: [sqlite] Multiple Independent Database Instances

2019-04-22 Thread Keith Medcalf
t;-Original Message- >From: sqlite-users [mailto:sqlite-users- >boun...@mailinglists.sqlite.org] On Behalf Of Lee, Jason >Sent: Monday, 22 April, 2019 15:26 >To: SQLite mailing list >Subject: Re: [sqlite] Multiple Independent Database Instances > >I have a set of several mill

Re: [sqlite] Multiple Independent Database Instances

2019-04-22 Thread Simon Slavin
On 22 Apr 2019, at 10:25pm, Lee, Jason wrote: > I have a set of several million database files sitting on my filesystem. Each > thread will open a previously unprocessed database file, do some queries, > close the database, and move on to the next unprocessed database file. If this process is

Re: [sqlite] Multiple Independent Database Instances

2019-04-22 Thread Lee, Jason
on behalf of Keith Medcalf Sent: Monday, April 22, 2019 3:13:57 PM To: SQLite mailing list Subject: Re: [sqlite] Multiple Independent Database Instances This is somewhat unclear. You make two conflicting statements: "I have been testing with 16, 32, and 48 threads/databases at once ..."

Re: [sqlite] Multiple Independent Database Instances

2019-04-22 Thread Keith Medcalf
Hell but only a Stairway to Heaven says a lot about anticipated traffic volume. >-Original Message- >From: sqlite-users [mailto:sqlite-users- >boun...@mailinglists.sqlite.org] On Behalf Of Lee, Jason >Sent: Monday, 22 April, 2019 14:08 >To: SQLite mailing list >Subject: Re:

Re: [sqlite] Multiple Independent Database Instances

2019-04-22 Thread Simon Slavin
On 22 Apr 2019, at 9:08pm, Lee, Jason wrote: > the cumulative time it takes for all of the threads to just open all > (millions) of the databases goes from 1200 seconds to 2200 seconds to 3300 > seconds. I'm guessing that it's the number of file handles which increases. Most OSes maintain a

Re: [sqlite] Multiple Independent Database Instances

2019-04-22 Thread Lee, Jason
Sent: Monday, April 22, 2019 12:52:28 PM To: SQLite mailing list Subject: Re: [sqlite] Multiple Independent Database Instances > On Apr 22, 2019, at 11:39 AM, Lee, Jason wrote: > > Hi. Are there any gotchas when opening multiple independent databases from > within one process using th

Re: [sqlite] Multiple Independent Database Instances

2019-04-22 Thread Jens Alfke
> On Apr 22, 2019, at 11:39 AM, Lee, Jason wrote: > > Hi. Are there any gotchas when opening multiple independent databases from > within one process using the C API? Do you mean different database files, or multiple connections to the same file? > I am opening one database per thread in my

Re: [sqlite] Multiple Independent Database Instances

2019-04-22 Thread Simon Slavin
On 22 Apr 2019, at 7:39pm, Lee, Jason wrote: > Hi. Are there any gotchas when opening multiple independent databases from > within one process using the C API? I am opening one database per thread in > my code, and noticed that sqlite3_open_v2 and sqlite3_close slow down as the > number of

[sqlite] Multiple Independent Database Instances

2019-04-22 Thread Lee, Jason
Hi. Are there any gotchas when opening multiple independent databases from within one process using the C API? I am opening one database per thread in my code, and noticed that sqlite3_open_v2 and sqlite3_close slow down as the number of threads increase, indicating there might be some resource