X-Original-To: pgsql-performance-postgresql.org@localhost.postgresql.org Received: from localhost (av.hub.org [200.46.204.144]) by svr1.postgresql.org (Postfix) with ESMTP id 0AAD4DAD9F for ; Tue, 25 Oct 2005 11:20:26 -0300 (ADT) Received: from svr1.postgresql.org ([200.46.204.71]) by localhost (av.hub.org [200.46.204.144]) (amavisd-new, port 10024) with ESMTP id 46894-08 for ; Tue, 25 Oct 2005 14:20:21 +0000 (GMT) Received: from mail.metronet.co.uk (mail.metronet.co.uk [213.162.97.75]) by svr1.postgresql.org (Postfix) with ESMTP id 0D8C7DACF5 for ; Tue, 25 Oct 2005 11:20:23 -0300 (ADT) Received: from mainbox.archonet.com (84-51-143-99.archon037.adsl.metronet.co.uk [84.51.143.99]) by smtp.metronet.co.uk (MetroNet Mail) with ESMTP id 741FB4149E7; Tue, 25 Oct 2005 15:20:17 +0100 (BST) Received: from localhost (localhost.localdomain [127.0.0.1]) by mainbox.archonet.com (Postfix) with ESMTP id 8429615EDA; Tue, 25 Oct 2005 15:16:31 +0100 (BST) Received: from mainbox.archonet.com ([127.0.0.1]) by localhost (mainbox [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 11889-04; Tue, 25 Oct 2005 15:16:27 +0100 (BST) Received: from [192.168.1.17] (client17.office.archonet.com [192.168.1.17]) by mainbox.archonet.com (Postfix) with ESMTP id 8C1DA15ED5; Tue, 25 Oct 2005 15:16:27 +0100 (BST) Message-ID: <435E3E3B.1000805@archonet.com> Date: Tue, 25 Oct 2005 15:16:27 +0100 From: Richard Huxton User-Agent: Mozilla Thunderbird 1.0.7 (X11/20051013) X-Accept-Language: en-us, en MIME-Version: 1.0 To: markus@m-bass.com Cc: pgsql-performance@postgresql.org Subject: Re: Reindex - Is this necessary after a vacuum? References: <20051025135607.39805.qmail@web31615.mail.mud.yahoo.com> In-Reply-To: <20051025135607.39805.qmail@web31615.mail.mud.yahoo.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, hits=0.059 required=5 tests=[AWL=0.009, FORGED_RCVD_HELO=0.05] X-Spam-Level: X-Archive-Number: 200510/362 X-Sequence-Number: 15130 Markus Benne wrote: > We are reindexing frequently, and I'm wondering if > this is really necessary, given that it appears to > take an exclusive lock on the table. > > Our table in question is vacuumed every 4 minutes, and > we are reindexing after each one. > > I'm not a fan of locking this table that frequently, > even if it is only for 5 - 10 seconds depending on > load. > > The vacuum is a standard vacuum. Nightly we do a > vacuum analyze. At most I'd do a nightly reindex. And in fact, I'd probably drop the index, full vacuum, recreate index. But you only need to reindex at all if you have a specific problem with the index bloating. Are you seeing this? -- Richard Huxton Archonet Ltd