Received: from maia.hub.org (unknown [200.46.208.211]) by mail.postgresql.org (Postfix) with ESMTP id CF05D633C83 for ; Thu, 1 Apr 2010 00:17:22 -0300 (ADT) Received: from mail.postgresql.org ([200.46.204.86]) by maia.hub.org (mx1.hub.org [200.46.208.211]) (amavisd-maia, port 10024) with ESMTP id 39582-01-10 for ; Thu, 1 Apr 2010 03:17:12 +0000 (UTC) X-Greylist: from auto-whitelisted by SQLgrey-1.7.6 Received: from mail.postnewspapers.com.au (202-89-185-120.static.dsl.amnet.net.au [202.89.185.120]) by mail.postgresql.org (Postfix) with ESMTP id D20B06339CC for ; Thu, 1 Apr 2010 00:13:31 -0300 (ADT) Received: from [10.0.0.53] (wallace.localnet [10.0.0.53]) by mail.postnewspapers.com.au (Postfix) with ESMTP id BA371AF587; Thu, 1 Apr 2010 11:12:26 +0800 (WST) Message-ID: <4BB40EE8.2080005@postnewspapers.com.au> Date: Thu, 01 Apr 2010 11:11:36 +0800 From: Craig Ringer User-Agent: Thunderbird 2.0.0.23 (X11/20090817) MIME-Version: 1.0 To: Jaime Casanova CC: raghavendra t , Kevin Grittner , pgsql-performance@postgresql.org Subject: Re: How to fast the REINDEX References: <4BB3722F02000025000302BF@gw.wicourts.gov> In-Reply-To: X-Enigmail-Version: 0.95.7 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=-0.928 tagged_above=-10 required=5 tests=AWL=-0.743, BAYES_40=-0.185 X-Spam-Level: X-Archive-Number: 201004/1 X-Sequence-Number: 38251 Jaime Casanova wrote: > On Wed, Mar 31, 2010 at 5:33 PM, raghavendra t > wrote: >>>> Why are you doing that? >> Our table face lot of updates and deletes in a day, so we prefer reindex to >> update the indexes as well overcome with a corrupted index. >> > > do you have a corrupted index? if not, there is nothing to do... > REINDEX is not a mantenance task on postgres Actually, if your free_space_map (pre 8.4) isn't up to keeping track of bloat, or autovac isn't running enough, you're likely to get bloat of indexes as well as tables that may need VACUUM FULL + REINDEX to properly clean up. It's probably better to fix your fsm/autovac settings then CLUSTER the table so it doesn't happen again, though. -- Craig Ringer