# Index Operations ![[assets/str_idx_btree.png|256]] **Index Operations** are specialized leaf nodes that provide non-linear access to data. Rather than walking the "Cafe Floor" from start to finish, they use optimized data structures to jump directly to relevant rows. ### The Architectural Role Indices are secondary relations—narrower than the main table—designed to minimize I/O by increasing selectivity. Index operations handle: 1. **Traversal**: Navigating structures like [[Manuscript/03 - Access Paths & Indexing/3.1 - B-Tree (The Balanced Bookshelf)|B-Trees]] to find a specific key range. 2. **Pointer Collection**: Gathering the **TIDs (Tuple Identifiers)** of the matching rows. 3. **Heap Coordination**: In a standard `Index Scan`, the engine uses these TIDs to perform "Random I/O" lookups in the main table heap. ### In the Explain Plan Index nodes are often the first sign of a healthy optimization strategy. They significantly reduce the `rows` estimate and the total `cost`. ```text -> Index Scan using animals_pkey on animals (cost=1.28..9.29 rows=1 width=18) Index Cond: (id = 42) ``` --- ![[Operations/Index/BitmapAndBitmapOr]] --- ![[Operations/Index/BitmapIndexScan]] --- ![[Operations/Index/IndexOnlyScan]] --- ![[Operations/Index/IndexScan]]