Re: Foreign key creation on table with huge record count. - Mailing list pgsql-admin

From Abhishek Singh
Subject Re: Foreign key creation on table with huge record count.
Date
Msg-id CANfmBj1gDQwUO027X9Nfuo2JHd3nGq932x1iedF1C2O0k1TauA@mail.gmail.com
Whole thread Raw
In response to Foreign key creation on table with huge record count.  (Gambhir Singh <gambhir.singh05@gmail.com>)
List pgsql-admin
Hi,

Ofcourse! You can speed up the execution of creation of FKC (Foreign Key 🔐 constraint) simply by running the queries that involve joins between the parent and child tables.  

Foreign key indexes can significantly improve performance for queries that involve joins between the parent and child tables.

"Join" need to be studied from table to table basis for different databases!

Regards,
Abhishek Singh

*****************************************
*****************************************
*****************************************

Sent using Panasonic - Egula 810 9P
*****************************************
*****************************************

On Tue, 31 Jan, 2023, 01:43 Gambhir Singh, <gambhir.singh05@gmail.com> wrote:
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

pgsql-admin by date:

Previous
From: Marcello Lorenzi
Date:
Subject: Pgsql best ha solution
Next
From: Ankur Kaushik
Date:
Subject: user permission denied for schema