Re: [sqlite] Optimizing concurrency with sql query - locks?

2009-05-07 Thread Jim Wilcoxson
The original question was about 300 queries, which I took to mean selects. If the database is in memory, will 300 selects still cause synchronous disk I/O? Jim On 5/6/09, John Stanton wrote: > Sqlite is an ACID database - it ensures that data is written to disk, so > a

Re: [sqlite] Optimizing concurrency with sql query - locks?

2009-05-06 Thread Rosemary Alles
Many thanks to all of you for your responses. Helped a great deal. I think I'm experiencing a "duh" moment. :) -rosemary. On May 6, 2009, at 10:34 AM, Olaf Schmidt wrote: > > "Rosemary Alles" schrieb im > Newsbeitrag news:AF79A266-B697-4924- >

Re: [sqlite] Optimizing concurrency with sql query - locks?

2009-05-06 Thread John Stanton
Sqlite is an ACID database - it ensures that data is written to disk, so a database in memory still shares a single disk resource. Jim Wilcoxson wrote: > I'm not sure what you are considering a massive slowdown, but let's > assume that the entire database fits into memory and disk I/O isn't >

Re: [sqlite] Optimizing concurrency with sql query - locks?

2009-05-06 Thread Olaf Schmidt
"Rosemary Alles" schrieb im Newsbeitrag news:af79a266-b697-4924-b304-2b1feccba...@ipac.caltech.edu... > Run on a single processor, the following query is quite fast: > ...snip... > When concurrency is introduced (simply running the query on several > processors against

Re: [sqlite] Optimizing concurrency with sql query - locks?

2009-05-06 Thread Jim Wilcoxson
I'm not sure what you are considering a massive slowdown, but let's assume that the entire database fits into memory and disk I/O isn't the bottleneck. You said you're running 300 instances of the query on several processors. If several means 3 CPUs, then in a perfect world, running 300

Re: [sqlite] Optimizing concurrency with sql query - locks?

2009-05-06 Thread John Stanton
Igor Tandetnik wrote: > "Rosemary Alles" wrote > in message news:af79a266-b697-4924-b304-2b1feccba...@ipac.caltech.edu > >> Run on a single processor, the following query is quite fast: >> >> When concurrency is introduced (simply running the query on several >>

Re: [sqlite] Optimizing concurrency with sql query - locks?

2009-05-06 Thread Igor Tandetnik
"Rosemary Alles" wrote in message news:af79a266-b697-4924-b304-2b1feccba...@ipac.caltech.edu > Run on a single processor, the following query is quite fast: > > When concurrency is introduced (simply running the query on several > processors against the same database - say

[sqlite] Optimizing concurrency with sql query - locks?

2009-05-05 Thread Rosemary Alles
Hullo all, Run on a single processor, the following query is quite fast: // Select Statement sprintf(sql_statements, "select lp.%s, lp.%s, lp.%s, lp.%s, pb.%s from %s lp, %s pb " "where lp.%s > ? and lp.%s=pb.%s " "order by lp.%s, lp.%s, pb.%s",