Re: What is the cost of integrity constraints?

From: joel garry <>
Date: Wed, 15 Apr 2009 11:12:54 -0700 (PDT)
Message-ID: <>

On Apr 14, 9:13 pm, Phper <> wrote:
> Does the database run much slower if there are many integrity
> constraints?

Depends on the implementation. At a certain level of complexity, it becomes as difficult to maintain them in the database as in the application. Then you wind up with infinite argumentation over where the line is drawn.

Of course, if you have unnecessary constraints the database will run slower.

I am currently spending much time trying to fix a report. The root problem is that the users were not constrained in how they defined the scale of several related columns across numerous tables. So, some defined it one way, some another, some a third, some inconsistently between rows. Not a problem, until their boss decided she wanted a consolidated report, with averages.

But the database runs fine, except for when some other unconstrained reports take over the CPU. Actually the database is running fine even when EM shows an ocean of green, just some users have to wait a while. But who's more important, the boss or the workers with the customers?

Define "much slower."


-- is bogus.
Received on Wed Apr 15 2009 - 13:12:54 CDT

Original text of this message