til
til copied to clipboard
Re-Introducing Hash Indexes in PostgreSQL
The Ugly Duckling of index types
https://hakibenita.com/postgresql-hash-index
When to use B+ Tree vs Hash Index If you are 100% certain that a column will only ever need to be looked up via direct equality (eg... where id = X), then you can use a hash index. Even in that case, unless that table is at the core of your business and is becoming a bottleneck for system performance in general, I would just use a B+ tree anyways. Why? Because you're really not giving up very much!
https://www.sqlpipe.com/blog/b-tree-vs-hash-index-and-when-to-use-them