Live data from Hacker News

Modern B-Tree Techniques (2011)

citeseerx.ist.psu.edu

11–12 of 12 posts

Re: Modern B-Tree Techniques (2011)

#11

> Probably the strongest arguments for B-trees over hash indexes pertain to multi-field indexes and to nonuniform distributions of key values. A hash index on multiple fields requires search keys for all those fields such that a hash value can be calculated. A B-tree index, on the other hand, can efficiently support exact-match queries for a prefix of the index key, i.e., any number of leading index fields Yes, well,…

One thing that doesn't make the two interchangeable is total ordering and range queries, which are only supported by B-trees and not by hash indexes. So the question is whether you're willing to trade that away for faster insertion and lookup. > When you have fast byte-addressable storage it will pay to not read pages It always pays to not read pages :-) An alternative way to look at it is that faster storage is more…

When you have fast byte addressable storage you can just go to plain old binary trees. But b-trees still have some advantage in the amount of storage needed.

Re: Modern B-Tree Techniques (2011)

#12

> Probably the strongest arguments for B-trees over hash indexes pertain to multi-field indexes and to nonuniform distributions of key values. A hash index on multiple fields requires search keys for all those fields such that a hash value can be calculated. A B-tree index, on the other hand, can efficiently support exact-match queries for a prefix of the index key, i.e., any number of leading index fields Yes, well,…

One thing that doesn't make the two interchangeable is total ordering and range queries, which are only supported by B-trees and not by hash indexes. So the question is whether you're willing to trade that away for faster insertion and lookup. > When you have fast byte-addressable storage it will pay to not read pages It always pays to not read pages :-) An alternative way to look at it is that faster storage is more…

So the question is whether you're willing to trade that away for faster insertion and lookup.

I wouldn't characterize the decision as a trade off. They're different tools for different situations.

Post reply on HN