I have a somewhat large table, 3 million rows, 1 Gig on disk, and growing. Doing a
count(*) takes around 40 seconds.
Looks like the count(*) fetches the table from disk and goes through it.
Made me wonder, why the optimizer doesn't just choose the smallest index
which in my case is around 60 Megs and goes through it, which it could
do in a fraction of the time.
1700 MLK Way
Berkeley, CA 94709
pgsql-performance by date
|Next:||From: scott.marlowe||Date: 2003-10-02 19:34:16|
|Subject: further testing on IDE drives|
|Previous:||From: Bill Moran||Date: 2003-10-02 19:00:19|
|Subject: Re: low cardinality column|
pgsql-hackers by date
|Next:||From: Tomasz Myrta||Date: 2003-10-02 19:36:42|
|Subject: Re: count(*) slow on large tables|
|Previous:||From: Bruno Wolff III||Date: 2003-10-02 19:15:33|
|Subject: Re: Thoughts on maintaining 7.3|