Re: Decrease time needed to CREATE INDEX and FOREIGN KEY on new tablecolumn which has all values NULL

Поиск
Список
Период
Сортировка
От Ravi Krishna
Тема Re: Decrease time needed to CREATE INDEX and FOREIGN KEY on new tablecolumn which has all values NULL
Дата
Msg-id 038B7823-6C23-4606-9F1B-2B6BA097FDF9@fastmail.com
обсуждение исходный текст
Ответ на Decrease time needed to CREATE INDEX and FOREIGN KEY on new tablecolumn which has all values NULL  (Denisa Cirstescu <Denisa.Cirstescu@tangoe.com>)
Список pgsql-general
> The table is huge and it takes a lot of time to add the INDEX and the FOREIGN KEY although all values are NULL.
> Considering that the new DepartmentId column is NULL for all rows at this point, is there a way to make the INDEX and
FOREIGNKEY creation run faster? 

In your script to create index add this:

set maintenance_work_mem = '1GB'
or any other figure you feel comfortable.




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

Предыдущее
От: Denisa Cirstescu
Дата:
Сообщение: Decrease time needed to CREATE INDEX and FOREIGN KEY on new tablecolumn which has all values NULL
Следующее
От: Alvaro Herrera
Дата:
Сообщение: Re: Decrease time needed to CREATE INDEX and FOREIGN KEY on newtable column which has all values NULL