Will be any performance degrade if the columns having check constraints in a table?
A table ABC is having 20 columns and out of these 7 columns are having check constraints (these columns accept either 'Y' or 'N' and default value is specified 'N').
When there is a bulk inserts (around 10k records) are going on, will these check constraints cause any performance degrage?
Thanks in advance.
If you are sure that your bulk inserts will not violate your check constraints values. ie you are sure that the inserts have no values other that 'Y' or 'N' then you can remove the check constraint and enable them later.
But if you are not sure then let it be there... will save your work for finding the violating rows later when you are trying to enable the check constraint.
"There is a difference between knowing the path and walking the path."
If you are absolutely totally sure that the only values that can gt in there are valid, you might go a step further and permanently set the constraint to disabled and novalidate, and the set it to RELY.
Or drop it entirely of course.
Click Here to Expand Forum to Full Width