Create Index (Hash) on a Large Table Taking Days...

Поиск
Список
Период
Сортировка
От ProfKheel
Тема Create Index (Hash) on a Large Table Taking Days...
Дата
Msg-id 8e986c11-f88f-4e6d-a2ca-bd8abda54209@c4g2000hsg.googlegroups.com
обсуждение исходный текст
Ответы Re: Create Index (Hash) on a Large Table Taking Days...  ("Harald Armin Massa" <haraldarminmassa@gmail.com>)
Список pgsql-general
I have a very large table (~5GB, 100mm rows) on which I am creating an
index on an int4 column:

CREATE INDEX CONCURRENTLY rums_idx2
  ON rums
  USING hash
  (user_id);

The process has been running for about two days, and the index has
been growing; when I run du i can see that it is ~2GB on the
filesystem, though it is incrementing at a snail's pace; maybe 500kB
per minute or so.  From posts I've read it seems abnormal that it
should be taking this long.  My suspicion is that the hash function is
what is slowing it down or maybe I should have fsync=off.

I have shmmax at about 256MB and my conf is as follows:

shared_buffers = 224MB                  # min 128kB or
max_connections*16kB
work_mem = 112MB                                # min 64kB
maintenance_work_mem = 212MB            # min 1MB

Info:

postgresql-8.2
Linux vostro200 2.6.20-15-server #2 SMP Sun Apr 15 07:41:34 UTC 2007
i686 GNU/Linux
1GB RAM
Intel CoreDuo

Any ideas?

В списке pgsql-general по дате отправления:

Предыдущее
От: "O'Shea, Brendan"
Дата:
Сообщение: Re: ERROR: catalog is missing 9 attribute(s) for relid 10297
Следующее
От: Christopher M Siwy
Дата:
Сообщение: Cannot connect to PgPool