[sqlite] count(*) slow

2005-09-15 Thread Da Martian
Hi I have 3 million rows in a table which takes up about 3.1GB on disk. The count(*) is slow. I have run the analyze, but apart from creating the stats table it does nothing. Any reason why this is? Can it be improved ?

RE: [sqlite] count(*) slow

2005-09-15 Thread Thomas Briggs
To: sqlite-users@sqlite.org Subject: [sqlite] count(*) slow Hi I have 3 million rows in a table which takes up about 3.1GB on disk. The count(*) is slow. I have run the analyze, but apart from creating the stats table it does nothing. Any reason why this is? Can it be improved ?

Re: [sqlite] count(*) slow

2005-09-15 Thread D. Richard Hipp
On Thu, 2005-09-15 at 13:59 +0100, Da Martian wrote: Hi I have 3 million rows in a table which takes up about 3.1GB on disk. The count(*) is slow. I have run the analyze, but apart from creating the stats table it does nothing. Any reason why this is? Can it be improved ? SQLite

Re: [sqlite] count(*) slow

2005-09-15 Thread Puneet Kishor
On Sep 15, 2005, at 8:43 AM, D. Richard Hipp wrote: On Thu, 2005-09-15 at 13:59 +0100, Da Martian wrote: Hi I have 3 million rows in a table which takes up about 3.1GB on disk. The count(*) is slow. I have run the analyze, but apart from creating the stats table it does nothing. Any

Re: [sqlite] count(*) slow

2005-09-15 Thread Chris Schirlinger
Interesting. But, with the above suggestion, every INSERT or DELETE would slow down anyway as much as it would have were SQLite to maintain meta information itself, no? . Hence, it might be worthwhile maintaining the meta information no matter what... most of the folks won't ever

Re: [sqlite] count(*) slow

2005-09-15 Thread Darren Duncan
At 8:56 AM -0500 9/15/05, Puneet Kishor wrote: Hence, it might be worthwhile maintaining the meta information no matter what... most of the folks won't ever notice it, and everyone would marvel at how quickly COUNT(*) was returning the results. You are assuming that everyone wants to do a

Re: [sqlite] count(*) slow

2005-09-15 Thread rbundy
| | cc: | | Subject: Re: [sqlite] count(*) slow