3 ms·
I think part of it is inertia. There was a time when C++ only had a tree based map, but eventually it got a hash map too. And part of it is that a database nee
by im3w1l 7y ago
I think part of it is inertia. There was a time when C++ only had a tree based map, but eventually it got a hash map too.
And part of it is that a database needs a sorted index. Because a lot of common queries would be awful without one. And when you have a sorted index already, a hash index becomes a nice-to-have.
- downerending 7y agoAdding to that, a database typically has to be ready for all kinds of queries. But when choosing a data structure in a program, one often knows a great deal about exactly what queries will show up.