Re: [sqlite] Addition: Re: SQLite locking question

2011-05-06 Thread Pavel Ivanov
> My understanding of the shared cache model was that it just ist intended > for solving our problem by relaxing the locking a little and that there > should not be any mutexes at all when using the uncomitted read mode. > > Have I missed anything? Yes, you are involved in a "magical" thinking.

Re: [sqlite] Addition: Re: SQLite locking question

2011-05-06 Thread Ole Reinhardt
Hi Pavel, > >> Any other chance to speed this up (apart from the obvious "optimize the > >> query, do not use distinct on large tables)= > > > > Without seeing the query or database schema? Not really... Depending > > on the exact query an index on "xyz" might help. > > Another suggestion

Re: [sqlite] Addition: Re: SQLite locking question

2011-05-06 Thread Ole Reinhardt
Hi Dan, >[...] > Mutexes are held for the duration of an sqlite3_step() call to make > sure SQLite doesn't segfault when two threads try to access the same > shared-cache object. Ok, I see, so there is no chance to access the data realy in _parallel_? (Just for reading). > > Any other chance to

Re: [sqlite] Addition: Re: SQLite locking question

2011-05-06 Thread Pavel Ivanov
>> Any other chance to speed this up (apart from the obvious "optimize the >> query, do not use distinct on large tables)= > > Without seeing the query or database schema? Not really... Depending > on the exact query an index on "xyz" might help. Another suggestion could be to turn off shared

Re: [sqlite] Addition: Re: SQLite locking question

2011-05-06 Thread Ole Reinhardt
Hi Dan, > > I have to correct myself a little... the hanging sqlite3_open_v2() does > > not happe while the prepare of the first query but during the first > > sqlite3_step() of the first query... > > Each shared-cache has a mutex associated with it. When > sqlite3_step is called it grabs the

Re: [sqlite] Addition: Re: SQLite locking question

2011-05-06 Thread Dan Kennedy
On 05/06/2011 05:53 PM, Ole Reinhardt wrote: > Hi Dan, > >>> I have to correct myself a little... the hanging sqlite3_open_v2() does >>> not happe while the prepare of the first query but during the first >>> sqlite3_step() of the first query... >> >> Each shared-cache has a mutex associated with

Re: [sqlite] Addition: Re: SQLite locking question

2011-05-06 Thread Dan Kennedy
On 05/06/2011 05:17 PM, Ole Reinhardt wrote: > Hi all, > > I have to correct myself a little... the hanging sqlite3_open_v2() does > not happe while the prepare of the first query but during the first > sqlite3_step() of the first query... Each shared-cache has a mutex associated with it. When