B+ Tree Index & Range Scan Visualizer

B+ Trees power relational database indexes (PostgreSQL, MySQL InnoDB, SQLite) by storing all data pointers in a doubly linked leaf layer and keeping internal nodes purely for high-fanout routing.

Technical Reference & Equations

  • Order-m Node Key Capacity: \left\lceil \frac{m}{2} \right\rceil - 1 \le k \le m - 1 (Every non-root node stays at least 50% full, guaranteeing balanced disk utilization.)
  • B+ Tree Height Bound: h \le \left\lfloor \log_{\lceil m/2 \rceil}\left(\frac{N + 1}{2}\right) \right\rfloor + 1 (Point queries descend root-to-leaf in exactly h disk page reads.)
  • Range Scan Disk I/O Cost: \mathrm{IO}_{\text{range}} = h + L_{\text{leaves}} - 1 (Descends once to the lower bound key, then follows horizontal leaf sibling pointers.)

View full Databases & Storage Formula Sheet | Constants Table

Related Databases Calculators