From: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
---|---|
To: | Laurenz Albe <laurenz(dot)albe(at)cybertec(dot)at> |
Cc: | Jacque Edmund <jacqueedmund(at)gmail(dot)com>, pgsql-admin(at)lists(dot)postgresql(dot)org |
Subject: | Re: Native Foreign Keys housekeeping time intensive for Relational Model |
Date: | 2021-03-27 14:43:21 |
Message-ID: | 2002503.1616856201@sss.pgh.pa.us |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-admin |
Laurenz Albe <laurenz(dot)albe(at)cybertec(dot)at> writes:
> On Fri, 2021-03-26 at 14:00 -0400, Jacque Edmund wrote:
>> I've already seen that my current set of FK relationships between < 100 tables and data footprint
>> has yielded very large lookup times for the underlying referential integrity of the FKs to vet
>> whether it can DELETE a row or not based on its FK relationships.
> I would be surprised if correctly indexed foreign keys would slow deletes down so that
> the performance becomes intolerable.
Deletes being slow often means that you don't have an index on the
referencing column(s). PG requires you to have an index on the referenced
columns, but not on the other side of the FK relationship.
regards, tom lane
From | Date | Subject | |
---|---|---|---|
Next Message | Laurenz Albe | 2021-03-28 04:49:24 | Re: Native Foreign Keys housekeeping time intensive for Relational Model |
Previous Message | Mukesh Rajpurohit | 2021-03-27 10:26:14 | Re: Password encryption in oracle_fdw extention |