Click here to monitor SSC
SQLServerCentral is supported by Redgate
 
Log in  ::  Register  ::  Not logged in
 
 
 
        
Home       Members    Calendar    Who's On


Add to briefcase «««678910

A Check and Foreign Key Constraint Improves Query Performance Expand / Collapse
Author
Message
Posted Monday, December 9, 2013 2:49 AM
SSC Journeyman

SSC JourneymanSSC JourneymanSSC JourneymanSSC JourneymanSSC JourneymanSSC JourneymanSSC JourneymanSSC Journeyman

Group: General Forum Members
Last Login: Saturday, January 16, 2016 5:41 AM
Points: 98, Visits: 331
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.


Regards
Kumar Harsh

Post #1520970
Posted Monday, December 9, 2013 3:36 PM


SSC-Forever

SSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-Forever

Group: General Forum Members
Last Login: Yesterday @ 12:21 PM
Points: 41,233, Visits: 38,545
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."

Helpful Links:
How to post code problems
How to post performance problems
Post #1521329
Posted Thursday, March 5, 2015 4:08 AM
SSC Veteran

SSC VeteranSSC VeteranSSC VeteranSSC VeteranSSC VeteranSSC VeteranSSC VeteranSSC Veteran

Group: General Forum Members
Last Login: Tuesday, July 19, 2016 11:03 AM
Points: 209, Visits: 49
Very good post !!!
Post #1665828
« Prev Topic | Next Topic »

Add to briefcase «««678910

Permissions Expand / Collapse