X-Original-To: pgsql-performance-postgresql.org@localhost.postgresql.org Received: from localhost (mx2.hub.org [200.46.204.254]) by postgresql.org (Postfix) with ESMTP id 4ECC611F66F6 for ; Wed, 12 Apr 2006 04:22:09 -0300 (ADT) X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Score: -2.464 X-Spam-Level: X-Spam-Status: No, score=-2.464 required=5 tests=[BAYES_00=-2.599, FORGED_RCVD_HELO=0.135] Received: from postgresql.org ([200.46.204.71]) by localhost (mx2.hub.org [200.46.204.254]) (amavisd-new, port 10024) with ESMTP id cZUGfAlNt29W for ; Wed, 12 Apr 2006 04:22:02 -0300 (ADT) X-Greylist: from auto-whitelisted by SQLgrey- Received: from peufeu.com (boutiquenumerique.com [82.67.9.10]) by postgresql.org (Postfix) with ESMTP id 295B811F65F1 for ; Wed, 12 Apr 2006 04:22:00 -0300 (ADT) Received: (qmail 27787 invoked from network); 12 Apr 2006 09:22:54 +0200 Received: from boutiquenumerique.com (HELO apollo13) (82.67.9.10) by boutiquenumerique.com with SMTP; 12 Apr 2006 09:22:54 +0200 To: "Michael Glaesemann" , "Rodrigo Sakai" Cc: pgsql-performance@postgresql.org Subject: Re: FOREIGN KEYS vs PERFORMANCE References: <001301c65d9c$08884ef0$4700a8c0@TREEZANTHUS> <72C39159-1A4B-4595-A978-1DF57AD42527@myrealbox.com> Message-ID: Date: Wed, 12 Apr 2006 09:22:52 +0200 From: PFC Content-Type: text/plain; format=flowed; delsp=yes; charset=utf-8 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit In-Reply-To: <72C39159-1A4B-4595-A978-1DF57AD42527@myrealbox.com> User-Agent: Opera M2/8.51 (Linux, build 1462) X-Archive-Number: 200604/258 X-Sequence-Number: 18342 >> 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.