X-Original-To: pgsql-performance-postgresql.org@localhost.postgresql.org Received: from localhost (av.hub.org [200.46.204.144]) by postgresql.org (Postfix) with ESMTP id CEED211F602E for ; Sun, 9 Apr 2006 17:46:07 -0300 (ADT) X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Score: 1.439 X-Spam-Level: * X-Spam-Status: No, score=1.439 required=5 tests=[AWL=-0.480, DNS_FROM_RFC_ABUSE=0.479, DNS_FROM_RFC_POST=1.44] Received: from postgresql.org ([200.46.204.71]) by localhost (av.hub.org [200.46.204.144]) (amavisd-new, port 10024) with ESMTP id KcX06uUeJrlt for ; Sun, 9 Apr 2006 17:45:56 -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 B94D011F65F8 for ; Sun, 9 Apr 2006 17:45:55 -0300 (ADT) Received: from unknown (HELO cluster.surnet.cl) ([216.155.73.165]) by mx1.surnet.cl with ESMTP; 09 Apr 2006 16:45:55 -0400 X-IronPort-AV: i="4.04,104,1144036800"; d="scan'208"; a="52394954:sNHT18074096" Received: from alvh.no-ip.org (201.221.200.14) by cluster.surnet.cl (7.0.043) (authenticated as alvherre@surnet.cl) id 43A978FD00E0AA76; Sun, 9 Apr 2006 16:45:55 -0400 Received: by alvh.no-ip.org (Postfix, from userid 1000) id 69A5DC2DC22; Sun, 9 Apr 2006 16:45:55 -0400 (CLT) Date: Sun, 9 Apr 2006 16:45:55 -0400 From: Alvaro Herrera To: Tomas Vondra Cc: pgsql-performance@postgresql.org Subject: Re: serious problems with vacuuming databases Message-ID: <20060409204555.GB16673@surnet.cl> Mail-Followup-To: Tomas Vondra , pgsql-performance@postgresql.org References: <443950FB.4050707@fuzzy.cz> <20060409183747.GB15094@surnet.cl> <44397071.80008@fuzzy.cz> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <44397071.80008@fuzzy.cz> User-Agent: Mutt/1.5.11+cvs20060330 X-Archive-Number: 200604/184 X-Sequence-Number: 18268 Tomas Vondra wrote: > > Probably the indexes are bloated after the vacuum full. I think the > > best way to get rid of the "fat" is to recreate both tables and indexes > > anew. For this the best tool would be to CLUSTER the tables on some > > index, probably the primary key. This will be much faster than > > VACUUMing the tables, and the indexes will be much smaller as result. > > I guess you're right. I forgot to mention there are 12 composed indexes > on the largest (and not deleted) table B, having about 14.000.000 rows > and 1 GB of data. I'll try to dump/reload the database ... Huh, I didn't suggest to dump/reload. I suggested CLUSTER. You need to apply it only to tables where you have lots of dead tuples, which IIRC are A, C and D. -- Alvaro Herrera http://www.CommandPrompt.com/ The PostgreSQL Company - Command Prompt, Inc.