Re: Foreign key creation on table with huge record count.

From: Abhishek Singh <abhi(dot)singh(dot)solanki(at)gmail(dot)com>
To: Gambhir Singh <gambhir(dot)singh05(at)gmail(dot)com>
Cc: pgsql-admin(at)lists(dot)postgresql(dot)org
Subject: Re: Foreign key creation on table with huge record count.
Date: 2023-01-30 23:02:32
Message-ID: CANfmBj1gDQwUO027X9Nfuo2JHd3nGq932x1iedF1C2O0k1TauA@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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(dot)singh05(at)gmail(dot)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
>
>

In response to

Browse pgsql-admin by date

  From Date Subject
Next Message Ankur Kaushik 2023-01-31 02:08:33 user permission denied for schema
Previous Message Marcello Lorenzi 2023-01-30 22:57:45 Pgsql best ha solution