Received: from localhost (unknown [200.46.204.182]) by postgresql.org (Postfix) with ESMTP id 65F8D2E00BA for ; Thu, 3 Jan 2008 09:38:07 -0400 (AST) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.204.182]) (amavisd-maia, port 10024) with ESMTP id 32806-09 for ; Thu, 3 Jan 2008 09:37:51 -0400 (AST) Received: from tatm.com (unknown [83.145.126.57]) by postgresql.org (Postfix) with ESMTP id A68962E009D for ; Thu, 3 Jan 2008 09:37:56 -0400 (AST) X-MDSPF-Result: softfail (WWW4) Received-SPF: softfail (WWW4: domain of transitioning heraud@tatm.com does not designate 84.97.175.178 as permitted sender) x-spf-client=MDaemon.PRO.v8.1.1.R receiver=WWW4 client-ip=84.97.175.178 envelope-from= helo=[192.168.1.2] Received: from [192.168.1.2] (178.175.97-84.rev.gaoland.net [84.97.175.178]) by pilotage-modelisme.com (WWW4) (MDaemon.PRO.v8.1.1.R) with ESMTP id md50001341859.msg for ; Thu, 03 Jan 2008 14:37:49 +0100 Message-ID: <477CE510.8050008@tatm.com> Date: Thu, 03 Jan 2008 14:37:20 +0100 From: Pascal Heraud User-Agent: Thunderbird 2.0.0.9 (Windows/20071031) MIME-Version: 1.0 To: pgsql-admin@postgresql.org Subject: Re: Vacuum taking an age References: <5a9699850801030448k126a5028m85ddb2153e95184f@mail.gmail.com> In-Reply-To: <5a9699850801030448k126a5028m85ddb2153e95184f@mail.gmail.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 8bit X-Spam-Processed: WWW4, Thu, 03 Jan 2008 14:37:49 +0100 (not processed: message from valid local sender) X-Lookup-Warning: MAIL lookup on heraud@tatm.com does not match 84.97.175.178 X-MDRemoteIP: 84.97.175.178 X-Return-Path: heraud@tatm.com X-MDaemon-Deliver-To: pgsql-admin@postgresql.org X-Virus-Scanned: Maia Mailguard 1.0.1 X-Archive-Number: 200801/41 X-Sequence-Number: 27815 If you're using the version 8.1 and after, you should consider using the auto-vacuum daemon that is the best way to do it: http://www.postgresql.org/docs/8.1/static/maintenance.html Pascal; Brian Modra a écrit : > Hi, > > > I have a pretty "live" table: rows being inserted and updated more > than once 1 per second, though far, far more inserts than updates. > > There are currently over 3 million rows. > > It has not been vacuumed for months. > > Now a vacuum on that table takes hours, and I have not let it complete > because it stays running into our daily busy time... but I've been > told its necessary because the table is slowing down. > > I have begun a cron job which will do a daily analyze, and am thinking > of a weekly vacuum... > Please advise on the best way to keep this table maintained, even if > it means regularly taking the service offline early on Sunday > morning... > > thanks in advance > Brian > >