2006/8/10, Ron Johnson <ron.l.johnson@xxxxxxx>:
How aggressively does PostgreSQL keep b-trees in balance? Inserting the range [1..10000000] should result in a right- unbalanced tree.
Are you talking about a tree that is unbalanced regarding its height (ie, has some leaves that are further away from the root than others), or regarding the space occupation within the leafs (ie, some leaves are almost empty, while others are not)? In the former case I think you should read up some on B+trees, since they are by design always perfectly height-balanced. Note that the B does not stand for "binary". In the latter: It won't, because the splitting mechanism will never result in an almost-empty leaf. That can only be caused by deletions. greetings, Nicolas -- Nicolas Barbier http://www.gnu.org/philosophy/no-word-attachments.html