X-Original-To: pgsql-performance@postgresql.org Received: from localhost (postgresql.org [64.49.215.8]) by postgresql.org (Postfix) with ESMTP id 8156F475F39 for ; Mon, 24 Feb 2003 18:13:10 -0500 (EST) Received: from postgresql.org ([64.49.215.8]) by localhost (postgresql.org [64.49.215.8:10024]) (amavisd-new) with SMTP id 95659-10 for ; Mon, 24 Feb 2003 18:12:42 -0500 (EST) Received: from sss.pgh.pa.us (unknown [192.204.191.242]) by postgresql.org (Postfix) with ESMTP id 2D6A5476065 for ; Mon, 24 Feb 2003 15:50:35 -0500 (EST) Received: from sss2.sss.pgh.pa.us (tgl@localhost [127.0.0.1]) by sss.pgh.pa.us (8.12.6/8.12.6) with ESMTP id h1OKoZ5u005422; Mon, 24 Feb 2003 15:50:35 -0500 (EST) To: Josh Berkus Cc: Robert Treat , Clarence Gardner , Oleg Lebedev , "pgsql-performance@postgresql.org" Subject: Re: slow query In-reply-to: <200302241045.20856.josh@agliodbs.com> References: <1046111434.1014.165.camel@camel> <200302241045.20856.josh@agliodbs.com> Comments: In-reply-to Josh Berkus message dated "Mon, 24 Feb 2003 10:45:20 -0800" Date: Mon, 24 Feb 2003 15:50:35 -0500 Message-ID: <5421.1046119835@sss.pgh.pa.us> From: Tom Lane X-Virus-Scanned: by amavisd-new X-Archive-Number: 200302/192 X-Sequence-Number: 1248 Josh Berkus writes: > ... However, I agree that good FSM tuning and frequent > regular VACUUMs can greatly extend the period required for running FULL. > I have not found, though, that this does anything to prevent the need for > REINDEX on frequently-updated tables. How about you, Robert? As of 7.3, FSM doesn't have anything to do with indexes. If you have index bloat, it's because of the inherent inability of btree indexes to reuse space when the data distribution changes over time. (Portions of the btree may become empty, but they aren't recycled.) You'll particularly get burnt by indexes that are on OIDs or sequentially assigned ID numbers, since the set of IDs in use just naturally tends to migrate higher over time. I don't think that the update rate per se has much to do with this, it's the insertion of new IDs and deletion of old ones that causes the statistical shift. The tree grows at the right edge, but doesn't shrink at the left. As of CVS tip, however, the situation is different ;-). Btree indexes will recycle space using FSM in 7.4. regards, tom lane