Re: FOREIGN KEYS vs PERFORMANCE

From: PFC <lists(at)peufeu(dot)com>
To: "Michael Glaesemann" <grzm(at)myrealbox(dot)com>, "Rodrigo Sakai" <rodrigo(dot)sakai(at)zanthus(dot)com(dot)br>
Cc: pgsql-performance(at)postgresql(dot)org
Subject: Re: FOREIGN KEYS vs PERFORMANCE
Date: 2006-04-12 07:22:52
Message-ID: op.s7vv4ex2cigqcu@apollo13
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-performance


>> I think this is an old question, but I want to know if it really is
>> well worth to not create some foreign keys an deal with the referential
>> integrity at application-level?????

Trust me : do it in the application and you'll enter a world of hurt. I'm
doing it with some mysql apps, and it's a nightmare ; doing cascaded
delete's by hand, etc, you always forget something, you have to modify a
million places in your code everytime you add a new table, your ORM
bloats, you get to write cleanup cron scripts which take forever to run,
your website crashes etc.

In response to

Responses

Browse pgsql-performance by date

  From Date Subject
Next Message Markus Schaber 2006-04-12 12:59:32 Re: Better index stategy for many fields with few values
Previous Message PFC 2006-04-12 07:19:18 Re: pgmemcache