Re: [sqlite] Parallel execution of queries in threads

2011-03-01 Thread Maddy
I checked with following scenario. There are 2 script 1) continuously inserting a row at a time in table with exclusive lock mode. 2) executing 4 SELECT queries. e.g. o SELECT column1, SUM(column2) FROM table_name WHERE column3 BETWEEN X AND Y GROUP BY column1; o SELECT column4,

Re: [sqlite] Parallel execution of queries in threads

2011-02-25 Thread Maddy
I had tried on sqlite version 3.7.4. Let me check it on sqlite version 3.7.5. Thanks, Madhav On Thu, Feb 24, 2011 at 9:19 PM, Richard Hipp d...@sqlite.org wrote: On Thu, Feb 24, 2011 at 4:52 AM, Maddy im4frie...@gmail.com wrote: Hi, I have 4 SELECT queries which are accessing same table.

[sqlite] Parallel execution of queries in threads

2011-02-24 Thread Maddy
Hi, I have 4 SELECT queries which are accessing same table. When I executed these queries concurrently using pthreads in Linux, it took approximate 10 Seconds. But same 4 queries executed sequentially it only took 2 seconds. Total Rows in table are 10. Sample query is SELECT column1,

Re: [sqlite] Parallel execution of queries in threads

2011-02-24 Thread Simon Slavin
On 24 Feb 2011, at 9:52am, Maddy wrote: I have 4 SELECT queries which are accessing same table. When I executed these queries concurrently using pthreads in Linux, it took approximate 10 Seconds. But same 4 queries executed sequentially it only took 2 seconds. Total Rows in table are

Re: [sqlite] Parallel execution of queries in threads

2011-02-24 Thread Black, Michael (IS)
From: sqlite-users-boun...@sqlite.org [sqlite-users-boun...@sqlite.org] on behalf of Maddy [im4frie...@gmail.com] Sent: Thursday, February 24, 2011 3:52 AM To: sqlite-users@sqlite.org Subject: EXT :[sqlite] Parallel execution of queries in threads Hi, I have 4

Re: [sqlite] Parallel execution of queries in threads

2011-02-24 Thread Pavel Ivanov
The reason could be caching, swapping or things like that. When you execute 4 queries concurrently in different connections each of them have to create its own memory cache of database pages. Reading data into cache involves syscalls to Linux kernel for reading from disk. Although Linux has its

Re: [sqlite] Parallel execution of queries in threads

2011-02-24 Thread Richard Hipp
On Thu, Feb 24, 2011 at 4:52 AM, Maddy im4frie...@gmail.com wrote: Hi, I have 4 SELECT queries which are accessing same table. When I executed these queries concurrently using pthreads in Linux, it took approximate 10 Seconds. But same 4 queries executed sequentially it only took 2 seconds.