From: Alvaro Herrera <alvherre@commandprompt.com>
To: Rafael Martinez <r.m.guerrero@usit.uio.no>
Cc: pgsql-performance@postgresql.org
Subject: Re: Need to run CLUSTER to keep performance
Date: Thu, 8 Nov 2007 11:56:46 -0300
Message-ID: <20071108145646.GI2938@alvh.no-ip.org> (raw)
In-Reply-To: <4732E6B4.1030907@usit.uio.no>
References: <4732E6B4.1030907@usit.uio.no>
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
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: pgsql-performance@postgresql.org
Cc: alvherre@commandprompt.com, r.m.guerrero@usit.uio.no
Subject: Re: Need to run CLUSTER to keep performance
In-Reply-To: <20071108145646.GI2938@alvh.no-ip.org>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox