PG 10 hash index create times - Mailing list pgsql-performance

From Rick Otten
Subject PG 10 hash index create times
Date
Msg-id CAMAYy4JA5F7p9584yxHz11N5NpOD7RbPmRx1zCKCraa2JHYR2w@mail.gmail.com
Whole thread Raw
List pgsql-performance
Since upgrading to PG 10 a few weeks ago I've been experimenting with hash indexes.  One thing I've noticed is that they seem to take a _lot_ longer to create than btree indexes, particularly on large tables.

I've got a moderately sized table of about 38M rows and the create index using hash for an integer column (with about 300 unique values) has been running for 12 hours now and still hasn't finished.  I have not successfully installed a hash index on a larger table (of which I have many) yet because the create index never seems to finish.

The create index thread will consume an entire CPU while doing this.  It does not seem to be I/O bound.  It just crunches away burning cpu cycles with no apparent end.

Is expected?

pgsql-performance by date:

Previous
From: Andreas Kretschmer
Date:
Subject: Re: pg_xlog unbounded growth
Next
From: Mariel Cherkassky
Date:
Subject: copy csv into partitioned table with unique index