PG 10 hash index create times

From: Rick Otten <rottenwindfish(at)gmail(dot)com>
To: "pgsql-performa(dot)" <pgsql-performance(at)postgresql(dot)org>
Subject: PG 10 hash index create times
Date: 2018-01-26 10:58:18
Message-ID: CAMAYy4JA5F7p9584yxHz11N5NpOD7RbPmRx1zCKCraa2JHYR2w@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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?

Browse pgsql-performance by date

  From Date Subject
Next Message Mariel Cherkassky 2018-01-28 09:11:33 copy csv into partitioned table with unique index
Previous Message Andreas Kretschmer 2018-01-26 08:18:38 Re: pg_xlog unbounded growth