Received: from localhost (unknown [200.46.204.182]) by postgresql.org (Postfix) with ESMTP id 530439FA46F for ; Wed, 12 Sep 2007 16:40:53 -0300 (ADT) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.204.182]) (amavisd-maia, port 10024) with ESMTP id 93663-09 for ; Wed, 12 Sep 2007 16:40:46 -0300 (ADT) X-Greylist: from auto-whitelisted by SQLgrey-1.7.5 Received: from lists.commandprompt.com (host-254.commandprompt.net [207.173.203.254]) by postgresql.org (Postfix) with ESMTP id CB2409FA423 for ; Wed, 12 Sep 2007 16:40:48 -0300 (ADT) Received: from perhan.alvh.no-ip.org ([190.95.8.15]) (authenticated bits=0) by lists.commandprompt.com (8.13.7/8.13.6) with ESMTP id l8CJechQ006624; Wed, 12 Sep 2007 12:40:43 -0700 Received: by perhan.alvh.no-ip.org (Postfix, from userid 1000) id E22BB47C68; Wed, 12 Sep 2007 15:40:36 -0400 (CLT) Date: Wed, 12 Sep 2007 15:40:36 -0400 From: Alvaro Herrera To: Scott Marlowe Cc: Mikko Partio , "ruben@rentalia.com" , Decibel! , db@zigo.dhs.org, pgsql-performance@postgresql.org Subject: Re: [Again] Postgres performance problem Message-ID: <20070912194036.GE2244@alvh.no-ip.org> References: <46E636CB.8080008@rentalia.com> <43393.192.121.104.48.1189495883.squirrel@zigo.dhs.org> <46E64891.9080005@rentalia.com> <20070911225242.GG38801@decibel.org> <46E79865.906@rentalia.com> <2ca799770709121156l7ddbb20agf8086e8bfcbc881a@mail.gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: User-Agent: Mutt/1.5.16 (2007-06-11) X-Virus-Scanned: ClamAV 0.91.1/4255/Wed Sep 12 00:18:47 2007 on projects.commandprompt.com X-Virus-Status: Clean X-Greylist: Sender succeded SMTP AUTH authentication, not delayed by milter-greylist-1.6 (lists.commandprompt.com [192.168.2.159]); Wed, 12 Sep 2007 12:40:44 -0700 (PDT) X-Virus-Scanned: Maia Mailguard 1.0.1 X-Archive-Number: 200709/232 X-Sequence-Number: 26777 Scott Marlowe escribió: > > Aren't you mixing up REINDEX and CLUSTER? > > I don't think so. reindex (which runs on tables and indexes, so the > name is a bit confusing, I admit) basically was originally a "repair" > operation that rewrote the whole relation and wasn't completely > transaction safe (way back, 7.2 days or so I think). Due to the > issues with vacuum full bloating indexes, and being slowly replaced by > regular vacuum, reindex received some attention to make it transaction > / crash safe and has kind of take the place of vacuum full in terms of > "how to fix bloated objects". Hmm, REINDEX does not rewrite tables. If there are dead tuples, they will still be there after REINDEX. > cluster, otoh, rewrites the table into index order. ... excluding dead tuples, and then rewrites all the indexes. -- Alvaro Herrera http://www.CommandPrompt.com/ The PostgreSQL Company - Command Prompt, Inc.