B-tree Pages
Growing the Tree
A root split grows the B-tree upward.
The root can split
When the root is full and a new insert arrives, the tree grows upward. A new root is created and the old root is split below it. Note: this is the height-changing case.
Before root split
Before the growing insert, recomputed height is 2 and page count is 5. Note: the root is full in the render, but height has not changed yet.
a page models a node; real B-trees tune fanout to disk pages; tiny exact trees prove structure/search behavior only - no I/O or perf claims.
After root split
After the next insert, recomputed height is 3 and page count is 7. Note: the render shows the new top page.
a page models a node; real B-trees tune fanout to disk pages; tiny exact trees prove structure/search behavior only - no I/O or perf claims.
A new top page appears
The old root had 3 keys, while the new root has 1 key. Note: those root key counts come from the compiled root nodes.
a page models a node; real B-trees tune fanout to disk pages; tiny exact trees prove structure/search behavior only - no I/O or perf claims.
Summary
Root split is how a B-tree increases height while keeping all leaves level. Note: a page models a node; real B-trees tune fanout to disk; no I/O or perf claims.