# Re-Introducing Hash Indexes in PostgreSQL

DevFeed: [Re-Introducing Hash Indexes in PostgreSQL](<https://devfeed.tech/articles/re-introducing-hash-indexes-in-postgresql-33923.md>)

Original publisher: [Read original article](<https://hakibenita.com/postgresql-hash-index>)

Author: Haki Benita

Published: 2021-01-10T22:00:00Z

Content type: tutorial

Language: en

Sources: [Haki Benita](<https://devfeed.tech/sources/haki-benita.md>)

Topics: [PostgreSQL](<https://devfeed.tech/topics/postgresql.md>), [hash](<https://devfeed.tech/topics/hash.md>), [Data structures](<https://devfeed.tech/topics/data-structures.md>), [Databases](<https://devfeed.tech/topics/databases.md>)

Tags: [articles](<https://devfeed.tech/tags/articles.md>), [data-structure](<https://devfeed.tech/tags/data-structure.md>), [database](<https://devfeed.tech/tags/database.md>), [hash](<https://devfeed.tech/tags/hash.md>), [index](<https://devfeed.tech/tags/index.md>), [indexes](<https://devfeed.tech/tags/indexes.md>), [performance](<https://devfeed.tech/tags/performance.md>), [postgresql](<https://devfeed.tech/tags/postgresql.md>), [sql](<https://devfeed.tech/tags/sql.md>)

## AI overview

This tutorial explains how PostgreSQL hash indexes work, including hash functions, buckets, tuple pointers, and collisions. It presents hash indexes as an option that can outperform B-Tree indexes under some circumstances.

## Source excerpt

There is a type of index you are probably not using, and may have never even heard of. It is wildly unpopular, and until a few PostgreSQL versions ago it was highly discouraged and borderline unusable, but under some circumstances it can out-perform even a B-Tree index.