B-tree Pages
Ordered Scan
An in-order walk reads keys in sorted order.
Ordered scan reads in order
Search follows one path, but an ordered scan walks the tree in key order. The scan result is recomputed from the compiled tree, then rendered as a sequence. Note: the sequence appears only in the diagram.
Tree source
The source tree has recomputed height 2 and key count 9. Note: the same compiled tree feeds the scan.
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.
Rendered scan
The recomputed scan emits 9 keys. Note: the render shows the sorted sequence without prose hand-typing it.
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.
Scan endpoints are recomputed
The scan starts at 10 and ends at 90. Note: these endpoints are read from the compiled scan result.
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.
Different inserts, ordered output
The ascending-insert tree has recomputed height 3 and its scan emits 9 keys. Note: scan order comes from the tree traversal, not from prose.
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
An ordered scan is deterministic because it is an in-order walk of the recomputed tree. Note: a page models a node; real B-trees tune fanout to disk; no I/O or perf claims.