Constraints make a bad performance, but why?

View previous topic View next topic Go down

Constraints make a bad performance, but why?

Post  asajapin on 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

View user profile

Back to top Go down

Re: Constraints make a bad performance, but why?

Post  ngalemmo on 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.
avatar
ngalemmo

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

View user profile http://aginity.com

Back to top Go down

View previous topic View next topic Back to top

- Similar topics

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