Re: [sqlite] count(gid) takes too long

2006-08-30 Thread Martin Jenkins
Sripathi Raj wrote: This is on a NFS on Windows XP Xeon - 2.8 Ghz, 1 Gig RAM and the database size is 395 MB. I'm connecting to the database from Perl. There is no discernible difference b/w Perl and sqlite shell. NFS? Hmm... You have been following the locking threads, haven't you? ;) How lo

Re: [sqlite] count(gid) takes too long

2006-08-29 Thread Roger Binns
Sripathi Raj wrote: > This is on a NFS If you really mean that then you have two problems. #1 - http://www.sqlite.org/faq.html#q7 The second is that you have network and server latency in addition to disk latency for all disk accesses. When iterating over so much data, those latencies soon add

Re: [sqlite] count(gid) takes too long

2006-08-29 Thread Sripathi Raj
Hi, This is on a NFS on Windows XP Xeon - 2.8 Ghz, 1 Gig RAM and the database size is 395 MB. I'm connecting to the database from Perl. There is no discernible difference b/w Perl and sqlite shell. Raj On 8/29/06, Martin Jenkins <[EMAIL PROTECTED]> wrote: Sripathi Raj wrote: > Main question:

Re: [sqlite] count(gid) takes too long

2006-08-29 Thread Martin Jenkins
Sripathi Raj wrote: Main question: Using DBD-SQLite, select count(gid) from es_src_media_info takes 130 secs. What gives? Repeatably 0.3 seconds or less here with apsw and python2.4 on Windows XP on a dual Athlon1600 with ~4 year old disks. Same sort of times in the sqlite command line shell.

Re: [sqlite] count(gid) takes too long

2006-08-29 Thread John Stanton
Sripathi Raj wrote: Hi, I have a table with 500,000 records. The following is the schema of that table: CREATE TABLE ES_SRC_MEDIA_INFO (GID INTEGER PRIMARY KEY AUTOINCREMENT, MEDIAPATH VARCHAR(256) NOT NULL UNIQUE, BYTES_USED LONG, BYTES_ON_DISK LONG, MTIME LONG, CTIME LONG, TYPE VARCHAR(20), C

[sqlite] count(gid) takes too long

2006-08-29 Thread Sripathi Raj
Hi, I have a table with 500,000 records. The following is the schema of that table: CREATE TABLE ES_SRC_MEDIA_INFO (GID INTEGER PRIMARY KEY AUTOINCREMENT, MEDIAPATH VARCHAR(256) NOT NULL UNIQUE, BYTES_USED LONG, BYTES_ON_DISK LONG, MTIME LONG, CTIME LONG, TYPE VARCHAR(20), CATEGORY VARCHAR(20),