Kimball Forum
Would you like to react to this message? Create an account in a few clicks or log in to continue.

Constraints make a bad performance, but why?

2 posters

Go down

Constraints make a bad performance, but why? Empty Constraints make a bad performance, but why?

Post  asajapin Fri Apr 22, 2011 1:47 pm

Hi all,

why do constraints make a bad performance for loading data in the Data Warehouse? why have they to be disabled while the ETL-Process runs?.

I would appreciate any answer...

Best Regards

asajapin

Posts : 1
Join date : 2011-04-22

Back to top Go down

Constraints make a bad performance, but why? Empty Re: Constraints make a bad performance, but why?

Post  ngalemmo Fri Apr 22, 2011 7:53 pm

I assume you are referring to foreign and primary key constraints... because it requires the database to perform one or more queries every time a row is added.

If you are inserting a row that contains a foreign key with a constraint, the DB must locate the row in the table that the FK is referencing. However, if you are using surrogate key assignment, your ETL code has already handled the check, making the FK constraint redundant.
ngalemmo
ngalemmo

Posts : 3000
Join date : 2009-05-15
Location : Los Angeles

http://aginity.com

Back to top Go down

Back to top

- Similar topics

 
Permissions in this forum:
You cannot reply to topics in this forum