From: Scott Marlowe <smarlowe@g2switchworks.com>
To: Rodrigo Sakai <rodrigo.sakai@zanthus.com.br>
Cc: pgsql-performance@postgresql.org
Subject: Re: FOREIGN KEYS vs PERFORMANCE
Date: Tue, 11 Apr 2006 14:48:46 -0500
Message-ID: <1144784926.32269.88.camel@state.g2switchworks.com> (raw)
In-Reply-To: <001301c65d9c$08884ef0$4700a8c0@TREEZANTHUS>
References: <001301c65d9c$08884ef0$4700a8c0@TREEZANTHUS>
On Tue, 2006-04-11 at 14:13, Rodrigo Sakai wrote:
> Hi,
>
> 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?????
> Specifically, the system we are developing is a server/cliente
> architecture that the server is the database and the fat client is an
> application developed in DELPHI!!!
>
If ref integrity is important, you'll have to do it either in the app or
the database.
Almost always, it's faster to let the database do it, as there's less
traffic across the wire required to maintain ref integrity, plus, the
guys who wrote the database have spent years making sure race conditions
won't scram your data.
For simple, straight forward FK->PK relationships, you will likely NOT
be able to beat the database in terms of either reliability or
performance with your own code.
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: smarlowe@g2switchworks.com, rodrigo.sakai@zanthus.com.br
Subject: Re: FOREIGN KEYS vs PERFORMANCE
In-Reply-To: <1144784926.32269.88.camel@state.g2switchworks.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