Skip site navigation (1) Skip section navigation (2)

Re: Need to run CLUSTER to keep performance

From: Alvaro Herrera <alvherre(at)commandprompt(dot)com>
To: Rafael Martinez <r(dot)m(dot)guerrero(at)usit(dot)uio(dot)no>
Cc: pgsql-performance(at)postgresql(dot)org
Subject: Re: Need to run CLUSTER to keep performance
Date: 2007-11-08 14:56:46
Message-ID: 20071108145646.GI2938@alvh.no-ip.org (view raw or flat)
Thread:
Lists: 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

In response to

Responses

pgsql-performance by date

Next:From: Tom LaneDate: 2007-11-08 15:01:09
Subject: Re: Estimation problem with a LIKE clause containing a /
Previous:From: Chris HooverDate: 2007-11-08 14:49:41
Subject: Help understanding stat numbers

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group