Re: Foreign key slows down copy/insert - Mailing list pgsql-performance

From Richard van den Berg
Subject Re: Foreign key slows down copy/insert
Date
Msg-id 425E8B70.2060006@trust-factory.com
Whole thread Raw
In response to Re: Foreign key slows down copy/insert  (Christopher Kings-Lynne <chriskl@familyhealth.com.au>)
Responses Re: Foreign key slows down copy/insert
List pgsql-performance
Christopher Kings-Lynne wrote:
> No it certainly won't warn you.  You have _avoided_ the check entirely.
>  That's why I was warning you...

I figured as much when I realized it was just a simple table update. I
was thinking more of a DB2 style "set integrity" command.

> If you wanted to be really careful, you could:

So I will be re-checking my own FKs. That's not really what I'd expect
from a FK.

My problem with this really is that in my database it is hard to predict
which inserts will be huge (and thus need FKs dissabled), so I would
have to code it around all inserts. Instead I can code my own integirty
logic and avoid using FKs all together.

Thanks,

--
Richard van den Berg, CISSP
-------------------------------------------
Trust Factory B.V. |     www.dna-portal.net
Bazarstraat 44a    |  www.trust-factory.com
2518AK The Hague   |  Phone: +31 70 3620684
The Netherlands    |  Fax  : +31 70 3603009
-------------------------------------------
    Have you visited our new DNA Portal?
-------------------------------------------

pgsql-performance by date:

Previous
From: Christopher Kings-Lynne
Date:
Subject: Re: Foreign key slows down copy/insert
Next
From: Christopher Kings-Lynne
Date:
Subject: Re: Foreign key slows down copy/insert