A B+ tree is a balanced search tree designed to keep each vertex in a storage database page. Internal vertices contain separator keys and child references; leaf vertices contain the indexed records or references to them. All leaves occur at the same depth, and linked leaves support ordered scans. PostgreSQL's index implementation illustrates this separation between leaf record references and internal downward references.[ref]
A large fan-out reduces storage accesses: with a fixed positive lower bound on nonroot internal fan-out, the height is . A database query first descends to the leaf containing a boundary key, then follows leaf links for a range. Separator keys guide navigation; their copies do not replace the leaf records.
For example, a root separator can direct keys below twelve to leaf and keys at least twelve to leaf . Searching for seventeen descends right. A range query from eight through seventeen starts in the left leaf and continues right. B+ tree node splits preserve the equal-depth structure as records are inserted.
New to topics? Read the docs here!