Re: FOREIGN KEYS vs PERFORMANCE

Поиск
Список
Период
Сортировка
От Scott Marlowe
Тема Re: FOREIGN KEYS vs PERFORMANCE
Дата
Msg-id 1144784926.32269.88.camel@state.g2switchworks.com
обсуждение исходный текст
Ответ на FOREIGN KEYS vs PERFORMANCE  ("Rodrigo Sakai" <rodrigo.sakai@zanthus.com.br>)
Список pgsql-performance
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.

В списке pgsql-performance по дате отправления:

Предыдущее
От: "Rodrigo Sakai"
Дата:
Сообщение: FOREIGN KEYS vs PERFORMANCE
Следующее
От: Dan Harris
Дата:
Сообщение: Re: Encouraging multi-table join order