Received: from localhost (unknown [200.46.204.191]) by postgresql.org (Postfix) with ESMTP id AA42B9FCB62 for ; Thu, 8 Nov 2007 11:21:36 -0400 (AST) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.204.191]) (amavisd-maia, port 10024) with ESMTP id 52787-03 for ; Thu, 8 Nov 2007 11:15:47 -0400 (AST) Received: from pat.uio.no (pat.uio.no [129.240.10.15]) by postgresql.org (Postfix) with ESMTP id 698889FA365 for ; Thu, 8 Nov 2007 11:15:47 -0400 (AST) Received: from mail-mx1.uio.no ([129.240.10.29]) by pat.uio.no with esmtp (Exim 4.67) (envelope-from ) id 1Iq96g-0002f0-0m; Thu, 08 Nov 2007 16:15:46 +0100 Received: from smtp.uio.no ([129.240.10.9] helo=mail-mx1.uio.no) by mail-mx1.uio.no with esmtp (Exim 4.67) (envelope-from ) id 1Iq96f-0001rq-MP; Thu, 08 Nov 2007 16:15:45 +0100 Received: from bbking.uio.no ([129.240.201.179]) by mail-mx1.uio.no with esmtpsa (TLSv1:AES256-SHA:256) (Exim 4.67) (envelope-from ) id 1Iq96f-0001rk-JE; Thu, 08 Nov 2007 16:15:45 +0100 Message-ID: <47332821.3010505@usit.uio.no> Date: Thu, 08 Nov 2007 16:15:45 +0100 From: Rafael Martinez User-Agent: Thunderbird 2.0.0.6 (X11/20070728) MIME-Version: 1.0 To: Heikki Linnakangas CC: pgsql-performance@postgresql.org Subject: Re: Need to run CLUSTER to keep performance References: <4732E6B4.1030907@usit.uio.no> <4732EF07.3060807@enterprisedb.com> <47332200.9050705@usit.uio.no> <473326C3.3070206@enterprisedb.com> In-Reply-To: <473326C3.3070206@enterprisedb.com> X-Enigmail-Version: 0.95.5 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit X-UiO-Resend: resent X-UiO-ClamAV-Virus: No X-UiO-Spam-info: not spam, SpamAssassin (score=-4.7, required=12.0, autolearn=disabled, AWL=0.313, UIO_MAIL_IS_INTERNAL=-5) X-UiO-Scanned: 46BFACCB2C329AF3FD15B78B335A733F743D0CFE X-UiO-SPAM-Test: remote_host: 129.240.10.9 spam_score: -46 maxlevel 200 minaction 2 bait 0 mail/h: 499 total 5009652 max/h 8345 blacklist 0 greylist 0 ratelimit 0 X-Virus-Scanned: Maia Mailguard 1.0.1 X-Archive-Number: 200711/102 X-Sequence-Number: 27517 Heikki Linnakangas wrote: > > If the table is already bloated, a VACUUM won't usually shrink it. It > only makes the space available for reuse, but a sequential scan still > needs to go through a lot of pages. > > CLUSTER on the other hand repacks the tuples and gets rid of all the > unused space on pages. You need to run CLUSTER or VACUUM FULL once to > shrink the relation, but after that frequent-enough VACUUMs should keep > the table size down. > Ok, thanks for the advice. We will try this and will come back with more information. -- Rafael Martinez, Center for Information Technology Services University of Oslo, Norway PGP Public Key: http://folk.uio.no/rafael/