[ZODB-Dev] Dumb question of the day

Andrew Kuchling akuchlin@mems-exchange.org
Fri, 30 Nov 2001 10:33:25 -0500


On Fri, Nov 30, 2001 at 09:44:52AM -0500, Casey Duncan wrote:
>How *bad*(tm)  is it to use sequencial "keys" when adding elements to an 
>IOBTree. Will I wind up with this as my tree structure?

No, B-trees are a balanced tree structure, so you should end up with a
reasonably bushy tree no matter what order you add keys in.  See the
second half of the page at
http://www.onthenet.com.au/~grahamis/int2008/week10/lect10.html for
some illustrations of B-trees, or consult the Cormen/Leiserson/Rivest
"Introduction to Algorithms" book.

--amk