Re: Need to run CLUSTER to keep performance - Mailing list pgsql-performance

From Alvaro Herrera
Subject Re: Need to run CLUSTER to keep performance
Date
Msg-id 20071108145646.GI2938@alvh.no-ip.org
Whole thread Raw
In response to Need to run CLUSTER to keep performance  (Rafael Martinez <r.m.guerrero@usit.uio.no>)
Responses Re: Need to run CLUSTER to keep performance  (Rafael Martinez <r.m.guerrero@usit.uio.no>)
List pgsql-performance
Rafael Martinez wrote:
> Hello
>
> This is a question about something we have seen sometimes in the last
> months. It happens with tables with a large amount of updates/selects
> compared with the amount of inserts/deletes. The sizes of these tables
> are small and the amount of rows too.
>
> The 'problem' is that performance decrease during the day and the only
> thing that helps is to run CLUSTER on the table with problems. VACUUM
> ANALYZE does not help.

Probably because all the live tuples are clustered at the end of the
table, and the initial pages are polluted with dead tuples.  Try
vacuuming the table much more often, say every few minutes.

Your table is 2536 pages long, but it could probably be in the vicinity
of 700 ...

--
Alvaro Herrera                                http://www.CommandPrompt.com/
PostgreSQL Replication, Consulting, Custom Development, 24x7 support

pgsql-performance by date:

Previous
From: Rafael Martinez
Date:
Subject: Re: Need to run CLUSTER to keep performance
Next
From: Tom Lane
Date:
Subject: Re: Estimation problem with a LIKE clause containing a /