Why are B-tree indexes common in databases?medium
Answer
They keep keys sorted, making equality lookups, range scans, and ordered reads efficient.
Explanation
B-trees have balanced height, so searches require relatively few page reads. They are useful for WHERE filters, joins, ORDER BY, and range predicates.
Follow-upWhen might an index not be used by the query planner?