Re: select count(*) performance - Mailing list pgsql-performance

From Kevin Grittner
Subject Re: select count(*) performance
Date
Msg-id 46C01F36.EE98.0025.0@wicourts.gov
Whole thread Raw
In response to Re: select count(*) performance  (valgog <valgog@gmail.com>)
List pgsql-performance
>>> valgog <valgog@gmail.com> 08/13/07 6:38 AM >>>
On Aug 11, 5:54 pm, Detlef Rudolph <ru...@gmx.de> wrote:
>
> I've tried the VACUUM ANALYSE, that doesn't help
> much, but VACUUM FULL improves Performance down
> from about 40 secs to 8.

Det,

I don't think anyone meant to suggest that VACUUM ANALYZE would improve the
count speed on a table which had become bloated, but its routine use would
PREVENT a table from becoming bloated.  Once bloat occurs, you need more
agressive maintenance, like VACUUM FULL or CLUSTER.

VACUUM FULL tends to cause index bloat, so you will probably see performance
issues in other queries at the moment.  You will probably need to REINDEX
the table or use CLUSTER to clean that up.

-Kevin




pgsql-performance by date:

Previous
From: Vivek Khera
Date:
Subject: Re: Dell Hardware Recommendations
Next
From: "Jonathan Ellis"
Date:
Subject: Re: How to ENABLE SQL capturing???