# 2.1 The B-Tree (The Librarian's Map) ![The B-Tree Bookshelf](Postgres/assets/arch_index_btree.png) When the warehouse (a Table) grows too large, the Lazy Elephant stops trying to walk the aisles. Instead, it hires a very small, very organized **Mouse Librarian** to maintain a **B-Tree**. ## The Branching Bookshelf Imagine a massive, perfectly symmetrical bookshelf that branches out like a tree. - At the very top (the **Root**), there is a single book that only tells you which shelf to look at next. - In the middle (the **Internal Nodes**), there are more books that give even more specific directions. - Finally, at the very bottom (the **Leaf Pages**), you find the actual "GPS coordinates" (the `ctid`) of the suitcases sitting in the warehouse. ## The Mouse's Shortcut Instead of walking past three million containers, the mouse starts at the root and only has to look at three or four books to find exactly where a suitcase is. To the elephant, this is magic. To the mouse, it's just efficient branching. For the technical details on the B-Tree's internal balancing act, see the [[Postgres/Structures/Index/BTree|B-Tree Reference]].