4 ms·
Sorry, I should have been clearer here. I was referring to queries with range predicates. Your counterexamples are true where all the returned/aggregated rows
by andrewf 17y ago
Sorry, I should have been clearer here. I was referring to queries with range predicates.
Your counterexamples are true where all the returned/aggregated rows have the same indexed value; it may make sense to hash index under such circumstances, but b-trees are a more sensible default.
I guess you could also have a situation where a range predicate maps nicely to a proportionate number of hash buckets. I don't know if any databases are clever enough to do this.