why no parallel index build? and diff time in building indexes

Поиск
Список
Период
Сортировка
От Bill Ross
Тема why no parallel index build? and diff time in building indexes
Дата
Msg-id 4b42826a-efb8-f4a5-8ca2-13087186316f@cgl.ucsf.edu
обсуждение исходный текст
Список pgsql-novice

I get it that there are situations where a parallel index build wouldn't work, but it seems to be impossible - how can that be right?

    id1 character varying(10),
    id2 character varying(10),

CREATE INDEX pairs_h_1_idx ON pr.pairs_h USING btree (id1);
CREATE INDEX pairs_h_2_idx ON pr.pairs_h USING btree (id2);

->

COPY 213531445
Time: 301621.653 ms (05:01.622)
CREATE INDEX
Time: 331532.765 ms (05:31.533)
CREATE INDEX
Time: 645480.485 ms (10:45.480)

and

COPY 437443831
Time: 351852.578 ms (05:51.853)
CREATE INDEX
Time: 179233.868 ms (02:59.234)
CREATE INDEX
Time: 438404.415 ms (07:18.404)

If not within the db, might it be possible to do it in a tool I could write, then somehow put it all directly in the db?

Within the db, a language addition (e.g. make CREATE take a list of actions) might be needed.

Question 2 is why the second index takes much longer than the 1st?

Finally, shout out to anyone from the early 90's.

Thanks,

Bill Ross

--
Phobrain.com

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

Предыдущее
От: Hadil Bader
Дата:
Сообщение: Is it doable to employ functional programming in implementing intraoperation parallelism in Postgres?
Следующее
От: Bill Ross
Дата:
Сообщение: project thru time