{
  "status": "shipping",
  "advantages": [],
  "limitations": [],
  "supersedes": [],
  "supersededBy": [],
  "firstSeen": null,
  "lastSeen": null,
  "updated": "2026-11-21",
  "slug": "b-tree",
  "term": "B-tree",
  "aliases": [
    "B tree",
    "BTree"
  ],
  "definition": "A B-tree is a balanced multiway search-tree family that groups ordered keys into nodes and keeps leaves at a common depth.",
  "note": "Many keys fit in one node, allowing a page-oriented index to branch more widely than a binary search tree. Implementations differ in whether records appear in internal nodes or only at leaves; B-tree is often used as a family name. [lehman-yao]\n\nPostgreSQL B-tree indexes support equality, range predicates and ordered retrieval. An index's ordering does not establish transaction visibility or verify the stored payload; an index-only scan has additional requirements. [pg-indexes] [ios]\n\nA classical B-tree can keep entries in internal nodes and leaves, whereas a B+ tree places application records or their references at leaves. [cmu]\n\nPostgreSQL 18 calls its access method B-Tree but documents leaf tuples pointing to table rows and internal tuples pointing to lower levels. Its pages are linked at each level, and splits can propagate toward the root. The product name alone does not specify classical record placement. [postgresql]",
  "related": [
    "bitmap-index",
    "b-link-tree",
    "postgresql-index-only-scan",
    "b-plus-tree",
    "b-epsilon-tree",
    "lsm-tree",
    "sqlite-without-rowid",
    "bw-tree",
    "partial-index",
    "covering-index",
    "clustered-index",
    "secondary-index",
    "composite-index",
    "postgresql-hash-index",
    "cache-oblivious-algorithm"
  ],
  "citations": [
    {
      "id": "lehman-yao",
      "title": "Lehman and Yao (1981), Efficient Locking for Concurrent Operations on B-Trees, TODS 6(4), 650-670; DOI 10.1145/319628.319663",
      "url": "https://www.cs.cmu.edu/~dga/15-712/F07/papers/Lehman81.pdf",
      "accessed": "2026-10-22"
    },
    {
      "id": "pg-indexes",
      "title": "PostgreSQL 16: Index Types, B-tree supported operations",
      "url": "https://www.postgresql.org/docs/16/indexes-types.html",
      "accessed": "2026-10-22"
    },
    {
      "id": "ios",
      "title": "PostgreSQL 16: Index-Only Scans and Covering Indexes",
      "url": "https://www.postgresql.org/docs/16/indexes-index-only-scans.html",
      "accessed": "2026-10-22"
    },
    {
      "id": "cmu",
      "title": "Carnegie Mellon 15-445/645, Fall 2024: Indexes & Filters I, sections 2 and 4.5",
      "url": "https://15445.courses.cs.cmu.edu/fall2024/notes/08-indexes1.pdf",
      "accessed": "2026-10-22"
    },
    {
      "id": "postgresql",
      "title": "PostgreSQL 18: B-Tree indexes, structure and page splits",
      "url": "https://www.postgresql.org/docs/18/btree.html#BTREE-IMPLEMENTATION",
      "accessed": "2026-10-22"
    },
    {
      "id": "hesela-buffered",
      "title": "Hesela: B-epsilon trees, B-tree foundations and observed page placement",
      "url": "https://hesela.com/analyses/b-epsilon-trees-buffered-updates/",
      "accessed": "2026-10-22"
    }
  ],
  "provenance": [
    "Family-level definition; PostgreSQL-supported operations and index-only visibility requirements are scoped to version 16, and page-structure details to version 18."
  ]
}
