IT lexicon Database B-tree

B-tree

Database På svenska → Updated: 2026-07-30

Balanced search tree designed for block-based storage — each node maps to a disk page and holds hundreds of keys, so a lookup takes only 3–4 disk I/Os even for billion-row tables.

Bayer & McCreight (1972). Default index type in nearly every relational database (Postgres, MySQL/InnoDB, SQL Server, SQLite). The B+-tree variant stores data only in leaves and links leaves so range scans become sequential. Great for OLTP with many point reads/writes.

Loses to LSM-trees on write-heavy workloads (writes amplify via random I/O) — which is why RocksDB, Cassandra and Scylla pick LSM.

← Back to the lexicon