X-Original-To: pgsql-admin-postgresql.org@localhost.postgresql.org Received: from localhost (mx1.hub.org [200.46.208.251]) by postgresql.org (Postfix) with ESMTP id 30CC49FA682 for ; Wed, 17 May 2006 17:37:09 -0300 (ADT) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.208.251]) (amavisd-new, port 10024) with ESMTP id 06413-05-4 for ; Wed, 17 May 2006 17:36:58 -0300 (ADT) X-Greylist: from auto-whitelisted by SQLgrey- Received: from mx1.surnet.cl (mx1.surnet.cl [216.155.73.180]) by postgresql.org (Postfix) with ESMTP id C2E3E9FB1B9 for ; Wed, 17 May 2006 17:36:23 -0300 (ADT) Received: from unknown (HELO cluster.surnet.cl) ([216.155.73.165]) by mx1.surnet.cl with ESMTP; 17 May 2006 16:36:22 -0400 X-IronPort-AV: i="4.05,138,1146456000"; d="scan'208"; a="65838062:sNHT21525224" Received: from alvh.no-ip.org (201.220.122.179) by cluster.surnet.cl (7.0.043) (authenticated as alvherre@surnet.cl) id 443B7DDC0052463B; Wed, 17 May 2006 16:36:21 -0400 Received: by alvh.no-ip.org (Postfix, from userid 1000) id 82152C37378; Wed, 17 May 2006 16:36:21 -0400 (CLT) Date: Wed, 17 May 2006 16:36:21 -0400 From: Alvaro Herrera To: Sriram Dandapani Cc: pgsql-admin@postgresql.org Subject: Re: autovacuum for large periodic deletes Message-ID: <20060517203621.GR26367@surnet.cl> Mail-Followup-To: Sriram Dandapani , pgsql-admin@postgresql.org References: <6992E470F12A444BB787B5C937B9D4DF045AF151@ca-mail1.cis.local> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <6992E470F12A444BB787B5C937B9D4DF045AF151@ca-mail1.cis.local> User-Agent: Mutt/1.5.11+cvs20060403 X-Virus-Scanned: Maia Mailguard 1.0.1 X-Archive-Number: 200605/238 X-Sequence-Number: 21770 Sriram Dandapani wrote: > Every night, a delete of about 50 million rows occurs on a table. Do we > need to explicitly vacuum the table or will autovacuum handle the large > deletes without affecting performance. I am trying to determine whether > or not I should completely rely on autovacuum or also tinker with manual > vacuums. How many rows stay in the table after the massive deletion? It may be that it's best for you to issue a CLUSTER or VACUUM FULL instead of VACUUM. (In any case, autovacuum would vacuum the table eventually, but maybe you can do better.) -- Alvaro Herrera http://www.CommandPrompt.com/ PostgreSQL Replication, Consulting, Custom Development, 24x7 support