Search Postgresql Archives

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

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



> 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 FOREIGN KEY creation run faster?

In your script to create index add this:

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







[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]

  Powered by Linux