SQL Server Query Performance Tuning

Try to avoid function (user defined or inbuild) in where condition of sql query as it is always overlook indexing created on tables and taking much longer time to execute in case of table having large number of rows (over million)

Have a look below query. How to avoid date range condition? I hope it may be helpful to you.

Query 1 : convert(date, getDate())

[code:sql]
SELECT * FROM xyz
WHERE convert(date, getDate()) = ‘2011-05-09’
[/code]

Query 2 : Fixed with differnt way

[code:sql]
SELECT * FROM xyz
WHERE createddate >= ‘2011-05-09’
AND createddate < dateAdd(d,1,’2011-05-09′)
[/code]