Re: What is the cost of integrity constraints?
Date: Wed, 15 Apr 2009 11:12:54 -0700 (PDT)
On Apr 14, 9:13 pm, Phper <hi.steven..._at_gmail.com> wrote:
> Does the database run much slower if there are many integrity
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."
-- _at_home.com is bogus. http://www3.signonsandiego.com/stories/2009/apr/15/1m15gaono234544-lawyer-no-one-idd-defendant/?uniontribReceived on Wed Apr 15 2009 - 13:12:54 CDT