Check Constraint!!
DBAsupport.com Forums - Powered by vBulletin
Results 1 to 3 of 3

Thread: Check Constraint!!

  1. #1
    Join Date
    Feb 2002
    Posts
    70

    Check Constraint!!

    Hello,

    Will be any performance degrade if the columns having check constraints in a table?

    Example:
    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.
    ________________
    ShanDJ

  2. #2
    Join Date
    Nov 2002
    Location
    New Delhi, INDIA
    Posts
    1,796
    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.
    Amar
    "There is a difference between knowing the path and walking the path."

    Amar's Blog  Get Firefox!

  3. #3
    Join Date
    Aug 2002
    Location
    Colorado Springs
    Posts
    5,253
    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.
    David Aldridge,
    "The Oracle Sponge"

    Senior Manager, Business Intelligence Development
    XM Satellite Radio
    Washington, DC

    Oracle ACE

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width