pg.ddx.io  pgsql-performance@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Rodrigo Sakai <rodrigo.sakai@zanthus.com.br>
To: pgsql-performance@postgresql.org
Subject: Re: FOREIGN KEYS  vs  PERFORMANCE
Date: Tue, 18 Apr 2006 14:19:29 -0300
Message-ID: <002601c6630c$403c9f70$4700a8c0@TREEZANTHUS> (raw)
References: <001301c65d9c$08884ef0$4700a8c0@TREEZANTHUS>
	<72C39159-1A4B-4595-A978-1DF57AD42527@myrealbox.com>
	<op.s7vv4ex2cigqcu@apollo13>
	<443D127D.2070601@modgraph-usa.com>
	<20060412153951.GH49405@pervasive.com>
	<443D3A9C.40106@modgraph-usa.com>
	<20060412205914.GL49405@pervasive.com>

  Thanks for all responses! I agree with most of you, and say that the RI is
best maintened by Database ! Performance must be improved in other ways
(indexes, hardware, etc)!


----- Original Message ----- 
From: "Jim C. Nasby" <jnasby@pervasive.com>
To: "Craig A. James" <cjames@modgraph-usa.com>
Cc: "PFC" <lists@peufeu.com>; "Michael Glaesemann" <grzm@myrealbox.com>;
"Rodrigo Sakai" <rodrigo.sakai@zanthus.com.br>;
<pgsql-performance@postgresql.org>
Sent: Wednesday, April 12, 2006 5:59 PM
Subject: Re: [PERFORM] FOREIGN KEYS vs PERFORMANCE


> On Wed, Apr 12, 2006 at 10:36:28AM -0700, Craig A. James wrote:
> > Jim C. Nasby wrote:
> > >>1. You have only one application that modifies the data.  (Otherwise,
you
> > >>have to duplicate the rules across many applications, leading to a
> > >>code-maintenance nightmare).
> > >
> > >You forgot something:
> > >
> > >1a: You know that there will never, ever, ever, ever, be any other
> > >application that wants to talk to the database.
> > >
> > >I know tons of people that get burned because they go with something
> > >that's "good enough for now", and then regret that decision for years
to
> > >come.
> >
> > No, I don't agree with this.  Too many people waste time designing for
> > "what if..." scenarios that never happen.  You don't want to be dumb and
> > design something that locks out a foreseeable and likely future need,
but
> > referential integrity doesn't meet this criterion.  There's nothing to
keep
> > you from changing from app-managed to database-managed referential
> > integrity if your needs change.
>
> In this case your argument makes no sense, because you will spend far
> more time re-creating RI capability inside an application than if you
> just use what the database offers natively.
>
> It's certainly true that you don't want to over-engineer for no reason,
> but many times choices are made to save a very small amount of time or
> hassle up-front, and those choices become extremely painful later.
> -- 
> 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
>
> ---------------------------(end of broadcast)---------------------------
> TIP 1: if posting/reading through Usenet, please send an appropriate
>        subscribe-nomail command to majordomo@postgresql.org so that your
>        message can get through to the mailing list cleanly
>




view thread (19+ messages)

Message-ID: <002601c6630c$403c9f70$4700a8c0@TREEZANTHUS>
Permalink:  ../002601c6630c$403c9f70$4700a8c0@TREEZANTHUS/
Also on:    postgresql.org/message-id/002601c6630c$403c9f70$4700a8c0@TREEZANTHUS

 · 

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: rodrigo.sakai@zanthus.com.br
  Subject: Re: FOREIGN KEYS  vs  PERFORMANCE
  In-Reply-To: <002601c6630c$403c9f70$4700a8c0@TREEZANTHUS>

* 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