Author Topic: What is disadvantages of function in where clause of sql query?  (Read 3846 times)

kaluahir16

  • Newbie
  • *
  • Posts: 20
    • View Profile
What is disadvantages of function in where clause of sql query?
« on: October 10, 2012, 04:02:54 PM »
SQL Server will not be able to use any index there may be on your date column.
This can kill performance on a large table
Regards,
Kalu Bhuva

BhushanShah

  • Global Moderator
  • Jr. Member
  • *****
  • Posts: 73
  • BhushanShah21
    • View Profile
Re: What is disadvantages of function in where clause of sql query?
« Reply #1 on: October 10, 2012, 08:59:40 PM »
are you talking about user defined functions or built in functions of sql server?
Regards,
Bhushan Shah

Ritesh Shah

  • Administrator
  • Jr. Member
  • *****
  • Posts: 57
  • Ritesh Shah
    • View Profile
    • IT Technology Blog
Re: What is disadvantages of function in where clause of sql query?
« Reply #2 on: October 11, 2012, 05:20:38 PM »
no matter whether it is UDF or system function but if your index is on column without function and you are having function with column in WHERE or ON clause, you will not get benefit of index
Ritesh Shah
Administrator
Extreme-Advice.com
SQLHub.com