B-Tree Indexing & EXPLAIN ANALYZE Execution Plans
Accelerate slow table scans with composite B-Tree indexes, evaluate query cost with EXPLAIN ANALYZE, and avoid index degradation pitfalls.
B-Tree Index Mechanics
### B-Tree Index Lookups
Without an index, querying a table requires a **Sequential Table Scan** ($O(N)$). Creating a B-Tree index builds a balanced logarithmic search tree ($O(log N)$) storing ordered pointers directly to row heap pages.