Unix Technical Forum

constraints using and performance question

This is a discussion on constraints using and performance question within the SQL Server Data Warehousing forums, part of the Microsoft SQL Server category; --> I've heard an opinion that adding foreign keys or check constraints at runtime can be a huge performance bottleneck. ...


Go Back   Unix Technical Forum > Database Server Software > Microsoft SQL Server > SQL Server Data Warehousing

Register FAQ Members List Calendar Search Today's Posts Mark Forums Read
  #1 (permalink)  
Old 02-27-2008, 07:08 PM
andrijz
 
Posts: n/a
Default constraints using and performance question

I've heard an opinion that adding foreign keys or check constraints at
runtime can be a huge performance bottleneck. (I mean for example
foreign keys in fact table and runtime process of data loading to data
warehouse database)

I don't think so, in my opinion using at least foreign keys is always
good practice and data consistency is ever more important than time of
data loading which is relatively rare.

Has anybody an experience of huge performance bottleneck during
process of data populating?

Thanks an advance,
Andriy

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #2 (permalink)  
Old 02-27-2008, 07:08 PM
Nestor
 
Posts: n/a
Default Re: constraints using and performance question

While adding it is important to have data consistency in your tables, it
is generally true that adding contraints and foreign keys to tables will
create performance bottleneck when it comes to data loading. I'm not sure
how big an impact it is but there is a difference.

If you can ensure consistent data loading at the ETL level, it is advised
to remove the constraints in a datawarehouse type of schema. However this
is not the same with OLTP schemas as you will need the database contraint
to prevent wrong insertions. In this case it is best practise to add the
contraint since it will not make much difference to performance as OLTP
then to add a single row at a time.



On Thu, 30 Aug 2007 06:39:45 -0700, andrijz <Andriy.Zabavskyy@gmail.com>
wrote:

> I've heard an opinion that adding foreign keys or check constraints at
> runtime can be a huge performance bottleneck. (I mean for example
> foreign keys in fact table and runtime process of data loading to data
> warehouse database)
>
> I don't think so, in my opinion using at least foreign keys is always
> good practice and data consistency is ever more important than time of
> data loading which is relatively rare.
>
> Has anybody an experience of huge performance bottleneck during
> process of data populating?
>
> Thanks an advance,
> Andriy
>




--
Using Opera's revolutionary e-mail client: http://www.opera.com/mail/
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On
Forum Jump


All times are GMT. The time now is 08:10 AM.


Powered by vBulletin® Version 3.6.5
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
SEO by vBSEO 3.2.0
www.UnixAdminTalk.com