pg.ddx.io  pgsql-performance@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Jim C. Nasby <jnasby@pervasive.com>
To: Michael Glaesemann <grzm@myrealbox.com>
Cc: Rodrigo Sakai <rodrigo.sakai@zanthus.com.br>
Cc: pgsql-performance@postgresql.org
Subject: Re: FOREIGN KEYS  vs  PERFORMANCE
Date: Tue, 11 Apr 2006 18:38:20 -0500
Message-ID: <20060411233820.GB49405@pervasive.com> (raw)
In-Reply-To: <72C39159-1A4B-4595-A978-1DF57AD42527@myrealbox.com>
References: <001301c65d9c$08884ef0$4700a8c0@TREEZANTHUS>
	<72C39159-1A4B-4595-A978-1DF57AD42527@myrealbox.com>

On Wed, Apr 12, 2006 at 08:06:17AM +0900, Michael Glaesemann wrote:
> 
> On Apr 12, 2006, at 4:13 , Rodrigo Sakai wrote:
> 
> >  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?????
> 
> If I had to choose between one or the other, I'd leave all  
> referential integrity in the database and deal with the errors thrown  
> when referential integrity is violated in the application. PostgreSQL  
> is designed to handle these kinds of issues. Anything you code in  
> your application is more likely to contain bugs or miss corner cases  
> that would allow referential integrity to be violated. PostgreSQL has  
> been pounded on for years by a great many users and developers,  
> making the likelihood of bugs still remaining much smaller.

It's also pretty unlikely that you can make RI in the application
perform better than in the database.
-- 
Jim C. Nasby, Sr. Engineering Consultant      jnasby@pervasive.com
Pervasive Software      http://pervasive.com    work: 512-231-6117
vcard: http://jim.nasby.net/pervasive.vcf       cell: 512-569-9461



view thread (19+ messages)  latest in thread

Message-ID: <20060411233820.GB49405@pervasive.com>
Permalink:  ../20060411233820.GB49405@pervasive.com/
Also on:    postgresql.org/message-id/20060411233820.GB49405@pervasive.com

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-performance@postgresql.org
  Cc: jnasby@pervasive.com, grzm@myrealbox.com, rodrigo.sakai@zanthus.com.br
  Subject: Re: FOREIGN KEYS  vs  PERFORMANCE
  In-Reply-To: <20060411233820.GB49405@pervasive.com>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox