hayko98 (vardan.hakopian (AT) gmail (DOT) com) writes:
Quote:
I am inserting data into 3 tables. Before I insert, I am dropping some
of the constrains. After inserting the data I added dropped
constrains back .Most of the constraints that I added I did not
specify WITH CHECK or WITH NOCHECK.5 Of them I used WITH NOCKECK.My
question is how would this adding and dropping constrains effect to
indexes and performence?.Do I have to reindex them? |
When it comes to UNIQUE and PRIMARY KEY constraints, NOCHECK has no
effect.
For FOREIGN KEYS and CHECK constraints, using NOCHECK means that SQL
Server does not verify that data in the table complies with the constraint.
This has the implication that the optimizer cannot trust the constraint,
and this could have an impact on performance.
--
Erland Sommarskog, SQL Server MVP, esquel (AT) sommarskog (DOT) se
Links for SQL Server Books Online:
SQL 2008: http://msdn.microsoft.com/en-us/sqlserver/cc514207.aspx
SQL 2005: http://msdn.microsoft.com/en-us/sqlserver/bb895970.aspx
SQL 2000: http://www.microsoft.com/sql/prodinf...ons/books.mspx