Question
B-tree versus hash indexes: what differs, and when should each be used?
Answer
B-tree supports equality, ranges, ordering, and several null tests. Hash supports equality comparisons. Use B-tree for general-purpose indexed access; consider hash where equality is the sole required search behavior.