Foreign key creation on table with huge record count.

From: Gambhir Singh <gambhir(dot)singh05(at)gmail(dot)com>
To: pgsql-admin(at)lists(dot)postgresql(dot)org
Subject: Foreign key creation on table with huge record count.
Date: 2023-01-30 20:12:45
Message-ID: CAHOGQfXR8JZk=-GyVeRVUNC4-ZoHUZmv=uRjWUOL2xnPuyDqnQ@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-admin

Hi,

I have a table with a record count of around 100 Million records. while
creating foreign key on the table took a significant amount time to get
created.

Is there any way to speed up the execution of creation of foreign key
constraint ?

do we have parallel hint like option in postgreSQL as there in Oracle.

--
Thanks & Regards
Gambhir Singh

Responses

Browse pgsql-admin by date

  From Date Subject
Next Message Scott Ribe 2023-01-30 21:09:35 Re: Foreign key creation on table with huge record count.
Previous Message Laurenz Albe 2023-01-26 20:44:35 Re: Problems with unique constraints