Received: from localhost (maia-1.hub.org [200.46.204.191]) by postgresql.org (Postfix) with ESMTP id DCA2D9FA621 for ; Mon, 27 Nov 2006 14:59:57 -0400 (AST) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.204.191]) (amavisd-new, port 10024) with ESMTP id 02601-06 for ; Mon, 27 Nov 2006 14:59:51 -0400 (AST) X-Greylist: from auto-whitelisted by SQLgrey-1.7.4 Received: from gwmta.wicourts.gov (gwmta.wicourts.gov [165.219.244.99]) by postgresql.org (Postfix) with ESMTP id 8EED29FA3AD for ; Mon, 27 Nov 2006 14:59:51 -0400 (AST) Received: from Courts-MTA by gwmta.wicourts.gov with Novell_GroupWise; Mon, 27 Nov 2006 12:59:50 -0600 Message-Id: <456AE144.EE98.0025.0@wicourts.gov> X-Mailer: Novell GroupWise Internet Agent 7.0.1 Date: Mon, 27 Nov 2006 12:59:48 -0600 From: "Kevin Grittner" To: "Joost Kraaijeveld" , Subject: Re: When to vacuum a table? References: <1164540257.7902.0.camel@panoramix> In-Reply-To: <1164540257.7902.0.camel@panoramix> Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Content-Disposition: inline X-Virus-Scanned: Maia Mailguard 1.0.1 X-Archive-Number: 200611/246 X-Sequence-Number: 22016 >>> On Sun, Nov 26, 2006 at 5:24 AM, in message <1164540257.7902.0.camel@panoramix>, Joost Kraaijeveld wrote: > > Are there guidelines (or any empirical data) available how to determine > how often a table should be vacuumed for optimum performance or is this > an experience / trial- and- error thing? For most of our databases we use a daily "VACUUM ANALYZE VERBOSE;". We grep the results to show large numbers of removable or dead rows and to show the fsm numbers at the end. There are a few small tables with high update rates which this doesn't cover. To handle that we set the autovacuum to 0.2/0.1 and 1/1 on a ten second interval and do a daily CLUSTER of these tables. We really don't have many tables which can hit these autovacuum thresholds in one day. We have databases which are 400 GB with the vast majority of that being in tables which are insert-only except for a weekly purge of data over a year old. We do nightly vacuums on the few tables with update/delete activity, and a weekly vacuum of the whole database -- right after the delete of old rows from the big tables. -Kevin