Monday, October 22, 2012

Functional Dependencies & Function in where clause


Functional Dependencies & Function in where clause

Functional dependency describes the concept that all other columns in a table must depend completely on the primary key column.


 Why is it not recommended to use a function in a where clause? (hint: think indexes)
It is not recommended to use functions in Where clause, because SQL Server cannot forecast the range of selection values, therefore it will always perform Index Scan instead of Index Seek.

No comments:

Post a Comment