create index in parallel?

Поиск
Список
Период
Сортировка
От Angva
Тема create index in parallel?
Дата
Msg-id 1158358658.275038.168840@e3g2000cwe.googlegroups.com
обсуждение исходный текст
Список pgsql-general
Hi, looking for a little advice...

Nightly, I run a script that does the following (in a nutshell): drop
most of the indexes in a particular schema; load a large amount of data
into this schema; finally recreate the indexes.

The create index process seems to be CPU-bound. The server has four
CPUs but postmaster is only using one. Is there a way to tell Postgres
to build in parallel? For instance in Oracle one can run the following
to have four processes build an index in parallel:

CREATE INDEX emp_ix ON emp (emp_id)
   PARALLEL (DEGREE 4);

I could always create each index from a separate script in parallel,
but that would be less flexible (can't easily modify degree for
instance) and take some serious redesign... No luck searching the docs,
but I'd just like to be sure that there isn't such a feature... Or if
there's a better way to tackle this problem I'd love to hear it.

So, any input would be appreciated.

Thanks,
Mark


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

Предыдущее
От: "Junkone"
Дата:
Сообщение: Re: remote duplicate rows
Следующее
От: "Weerts, Jan"
Дата:
Сообщение: Re: Installation with sources or with packages