Hi Andres and Greg,

> I think they're almost unused and don't offer enough advantage over btree

I largely agree with this. In my experience, B-tree accounts for 95%+ of
indexes, and all other access methods combined make up only a
small fraction. But I do see quite a few hash index users.

> we should have just ripped them out.

I have mixed feelings on this. On one hand, hash is probably the least used
"general-purpose" index since its use case overlaps directly with B-tree,
whereas GiST, SP-GiST, and BRIN exist for specialized data types or access
patterns that B-tree can't handle. On the other hand, in practice I still
see
hash indexes used at least as often as GiST, BRIN, or SP-GiST.

I suspect part of the low adoption is historical baggage from being
unlogged prior to old version, which gave hash indexes a bad reputation in
the
community, it also miss some features for general OLTP workloads

I feel  there is plenty of room for improvement there.

> The advantage hash does have, i.e. large key handling, would have better
been
> addressed by adding support to transparently btree indexing a hash of the
key + recheck.

That's an interesting point. But I think users can do that today with
expression
index right?

Thanks,
Shihao

Reply via email to