Received: from localhost (unknown [200.46.204.183]) by postgresql.org (Postfix) with ESMTP id 314B29FCB7B for ; Thu, 8 Nov 2007 11:10:22 -0400 (AST) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.204.183]) (amavisd-maia, port 10024) with ESMTP id 69190-05 for ; Thu, 8 Nov 2007 11:10:16 -0400 (AST) Received: from pat.uio.no (pat.uio.no [129.240.10.15]) by postgresql.org (Postfix) with ESMTP id 7BDA29FA15A for ; Thu, 8 Nov 2007 11:10:14 -0400 (AST) Received: from mail-mx5.uio.no ([129.240.10.46]) by pat.uio.no with esmtp (Exim 4.67) (envelope-from ) id 1Iq91I-0000cV-Oz for pgsql-performance@postgresql.org; Thu, 08 Nov 2007 16:10:12 +0100 Received: from smtp.uio.no ([129.240.10.9] helo=mail-mx5.uio.no) by mail-mx5.uio.no with esmtp (Exim 4.67) (envelope-from ) id 1Iq91H-0005if-7w; Thu, 08 Nov 2007 16:10:11 +0100 Received: from bbking.uio.no ([129.240.201.179]) by mail-mx5.uio.no with esmtpsa (TLSv1:AES256-SHA:256) (Exim 4.67) (envelope-from ) id 1Iq91H-0005ib-48; Thu, 08 Nov 2007 16:10:11 +0100 Message-ID: <473326D2.6030600@usit.uio.no> Date: Thu, 08 Nov 2007 16:10:10 +0100 From: Rafael Martinez User-Agent: Thunderbird 2.0.0.6 (X11/20070728) MIME-Version: 1.0 To: Rafael Martinez , pgsql-performance@postgresql.org Subject: Re: Need to run CLUSTER to keep performance References: <4732E6B4.1030907@usit.uio.no> <20071108145646.GI2938@alvh.no-ip.org> In-Reply-To: <20071108145646.GI2938@alvh.no-ip.org> 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.285, UIO_MAIL_IS_INTERNAL=-5) X-UiO-Scanned: F873925990716613981FBC43C5D2D46E378F9B8F X-UiO-SPAM-Test: remote_host: 129.240.10.9 spam_score: -46 maxlevel 200 minaction 1 bait 0 mail/h: 353 total 5009506 max/h 8345 blacklist 0 greylist 0 ratelimit 0 X-Virus-Scanned: Maia Mailguard 1.0.1 X-Archive-Number: 200711/100 X-Sequence-Number: 27515 Alvaro Herrera wrote: > Rafael Martinez wrote: >> 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 ... > We run VACUUM ANALYZE every 10 minuttes during 2-3 days to see if it helped, but when it didn't we when back to the old configuration (1 time everyday) Yes, after a CLUSTER we are using 517 pages. But the table does not grow much, it is always around 12-20MB, it looks like vacuum works without problems. regards, -- Rafael Martinez, Center for Information Technology Services University of Oslo, Norway PGP Public Key: http://folk.uio.no/rafael/