Re: Unbalanced Btree Indices ...

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: "Marc G(dot) Fournier" <scrappy(at)postgresql(dot)org>
Cc: pgsql-hackers(at)postgresql(dot)org
Subject: Re: Unbalanced Btree Indices ...
Date: 2004-03-21 16:39:49
Message-ID: 25897.1079887189@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

"Marc G. Fournier" <scrappy(at)postgresql(dot)org> writes:
> Pointers to docs that I'm not finding most acceptable ...

There aren't any, because at the time the 7.4 docs were being prepared,
we didn't have enough field experience to know whether its version of
index compaction would eliminate the practical need for REINDEX or not.
So the docs are intentionally vague.

We still haven't gotten a lot of feedback about the point from 7.4
users. Maybe no news is good news, or maybe it isn't ...

> Assuming that a rebuild is required, is there anyway of seeing how the
> index is balanced, to know when to do it?

Balance isn't a consideration for b-trees, because every part of the
tree is always the same depth. The only criterion is whether the
physical size of the index is unreasonable compared to the number of
entries it contains. "VACUUM VERBOSE" is sufficient to find out about
that, though I suppose it could give you a more direct index loading
figure than it does --- right now you have to do your own counting on
your fingers to estimate the average tuple size.

regards, tom lane

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Andrew Dunstan 2004-03-21 16:46:16 Re: [HACKERS] listening addresses
Previous Message Kris Jurka 2004-03-21 16:39:23 execute command tag including affected rows count