Re: Need to run CLUSTER to keep performance

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Rafael Martinez <r(dot)m(dot)guerrero(at)usit(dot)uio(dot)no>
Cc: Heikki Linnakangas <heikki(at)enterprisedb(dot)com>, pgsql-performance(at)postgresql(dot)org
Subject: Re: Need to run CLUSTER to keep performance
Date: 2007-11-08 15:33:00
Message-ID: 24775.1194535980@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-performance

Rafael Martinez <r(dot)m(dot)guerrero(at)usit(dot)uio(dot)no> writes:
> Heikki Linnakangas wrote:
>> On a small table like that you could run VACUUM every few minutes
>> without much impact on performance. That should keep the table size in
>> check.

> Ok, we run VACUUM ANALYZE only one time a day, every night.

There's your problem.

Reading between the lines I gather that you think an update is "free"
in the sense of not creating a need for vacuum. It's not --- it's
exactly equivalent to an insert + a delete, and it leaves behind a
dead row that needs to be vacuumed. If you do a lot of updates, you
need to vacuum.

regards, tom lane

In response to

Responses

Browse pgsql-performance by date

  From Date Subject
Next Message Chris Browne 2007-11-08 15:47:44 Re: Need to run CLUSTER to keep performance
Previous Message Guillaume Smet 2007-11-08 15:29:34 Re: Estimation problem with a LIKE clause containing a /