Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.server -> Re: How are INDEXES BALANCED?
Hello Kevin, Tom and others,
Sometime ago I began to suspect that what Kevin has written might in fact have been the case. So I set up an experiment (using 7.0.16) to check it out in detail, taking block dumps of the entire index before and after each operation. What I found to be happening was that if (using Kevin's illustration) the J branch block was full and needed to split, then a new block would be inserted next to the existing block, ON THE SAME LEVEL of the B*-tree, and the keys divided between the two blocks. The split requires that a new compressed key and block pointer be inserted into the parent block, which might in turn cause that block to split too, and so on, all the way up to the root if necessary. The effect of this algorithm (block splits propagating upwards) is that the B*-tree remains height balanced at all times, and rebalancing is never needed. Of course, some branches of the tree may become sparse, as others have already noted, but that is another matter. The tree remains balanced and Kevin's theory is not in fact what Oracle is doing internally.
Steve Adams
![]() |
![]() |