Re: What is the cost of integrity constraints?

From: <sybrandb_at_hccnet.nl>
Date: Thu, 16 Apr 2009 07:32:16 +0200
Message-ID: <nkgdu45vamu1pd5hte3ehcgvdnjd9lf9ch_at_4ax.com>



On Wed, 15 Apr 2009 21:23:17 -0700 (PDT), Phper <hi.steven.tu_at_gmail.com> wrote:

>On Apr 15, 12:50 pm, roelof.streeks..._at_gmail.com wrote:
>> On Apr 15, 12:13 am, Phper <hi.steven..._at_gmail.com> wrote:
>>
>> > Does the database run much slower if there are many integrity
>> > constraints?
>>
>> Yes it runs slower.
>> But the question you ask is WRONG!!
>> Most databases do more reads then writes so why would you optimise for
>> inserts instead of guaranteeing that the data is correct.
>> Most business people value correct data over speed of inserts.
>>
>> Thanks roelof.
>>
>> PS One of the corner stones of Relational Databases theory is having
>> constraints!!!!!!
>
>But we have an option. We can adopt triggers.

Which is about 8 times less efficient as constraints and triggers are always parsed.
This is not an option. This just one of the ways to end up with an unscalable app.

-- 
Sybrand Bakker
Senior Oracle DBA
Received on Thu Apr 16 2009 - 00:32:16 CDT

Original text of this message