Skip site navigation (1) Skip section navigation (2)

Re: slow query

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Josh Berkus <josh(at)agliodbs(dot)com>
Cc: Robert Treat <xzilla(at)users(dot)sourceforge(dot)net>,Clarence Gardner <clarence(at)silcom(dot)com>,Oleg Lebedev <oleg(dot)lebedev(at)waterford(dot)org>,"pgsql-performance(at)postgresql(dot)org" <pgsql-performance(at)postgresql(dot)org>
Subject: Re: slow query
Date: 2003-02-24 20:50:35
Message-ID: 5421.1046119835@sss.pgh.pa.us (view raw or flat)
Thread:
Lists: pgsql-performance
Josh Berkus <josh(at)agliodbs(dot)com> 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

In response to

Responses

pgsql-performance by date

Next:From: Anuradha RatnaweeraDate: 2003-02-25 04:11:43
Subject: Superfluous merge/sort
Previous:From: Tom LaneDate: 2003-02-24 20:17:40
Subject: Re: Memory taken by FSM_relations

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group