A Check and Foreign Key Constraint Improves Query Performance

  • Great Article !

    Suppose I create some other type of constraint on table like allow only numeric then how will this type of constraint affect performance ?

    Suppose I create computed column on table.Then how it will affect performance .

    So I have ask 2 question .

    Thanks.

    [font="Verdana"]Regards
    Kumar Harsh[/font]

    :unsure:

  • pandeharsh (12/9/2013)


    Great Article !

    Suppose I create some other type of constraint on table like allow only numeric then how will this type of constraint affect performance ?

    Suppose I create computed column on table.Then how it will affect performance .

    So I have ask 2 question .

    Thanks.

    No one will know for sure. You must test it in your environment.

    As to the computed column, if you persist the column, then performance will likely be better because because it will be recalculated only for inserts or updates of the related columns and not for reads as a non-persisted computed column would be.

    --Jeff Moden


    RBAR is pronounced "ree-bar" and is a "Modenism" for Row-By-Agonizing-Row.
    First step towards the paradigm shift of writing Set Based code:
    ________Stop thinking about what you want to do to a ROW... think, instead, of what you want to do to a COLUMN.

    Change is inevitable... Change for the better is not.


    Helpful Links:
    How to post code problems
    How to Post Performance Problems
    Create a Tally Function (fnTally)

  • Very good post !!!

Viewing 3 posts - 91 through 92 (of 92 total)

You must be logged in to reply to this topic. Login to reply