B-tree index.
also: B-tree · B-trees · B-tree indexes · B+ treeThe default database index: a balanced tree giving O(log n) lookups, range scans and sorted reads instead of full table scans.
the two-minute refresher
- Good for equality, ranges (age > 25 AND age < 50) and ORDER BY.
- Without an index the database scans every row, O(n).
- Hash indexes serve exact matches only; B-trees also do ranges.
- Every index speeds reads and slows writes: each insert updates every index.