Re: FOREIGN KEYS vs PERFORMANCE

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: FOREIGN KEYS vs PERFORMANCE
Дата
Msg-id 13087.1144810603@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: FOREIGN KEYS vs PERFORMANCE  ("Jim C. Nasby" <jnasby@pervasive.com>)
Список pgsql-performance
"Jim C. Nasby" <jnasby@pervasive.com> writes:
> On Wed, Apr 12, 2006 at 08:06:17AM +0900, Michael Glaesemann wrote:
>> ... 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.

I think the traditional assumption among the "you should do RI in the
application" crowd is that the application has higher-level knowledge
that lets it understand when it can skip doing an RI check entirely.
Skipping an RI check is always faster than doing it --- so that's right,
it's faster.  As long as you don't make any mistakes.

The question you have to ask yourself is whether you are really that
smart ... not just today, but every single time.  To quote Clint
Eastwood: "Do you feel lucky punk?  Well, do you?"

            regards, tom lane

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

Предыдущее
От: Christopher Kings-Lynne
Дата:
Сообщение: Re: Restore performance?
Следующее
От: PFC
Дата:
Сообщение: Re: pgmemcache