Why do Postgres hash indexes take so long to be created?

Viewed 255

Self-explanatory question. I have tested on a very large PostgreSQL table (+500M rows) where a B-TREE index takes around ~30 minutes to be created on a column which contains UUID or email-sized strings, while a hash index addition operation hasn't finished in hours.

What difference in their mechanism causes this?

(Referring to Postgres versions 12 and 13)

0 Answers
Related