Re: select count(*) performance

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



>>> valgog <valgog@xxxxxxxxx> 08/13/07 6:38 AM >>> 
On Aug 11, 5:54 pm, Detlef Rudolph <ru...@xxxxxx> 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
 



---------------------------(end of broadcast)---------------------------
TIP 9: In versions below 8.0, the planner will ignore your desire to
       choose an index scan if your joining column's datatypes do not
       match


[Postgresql General]     [Postgresql PHP]     [PHP Users]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Yosemite]

  Powered by Linux