• select * from table_name where dateDiff(d,@varDate,Created_Date) =0

    It seems to me that this test simply wants to compare an element to a static variable to determine if they match (which is the case if the dateDiff result is 0). Why not convert the variable to the appropriate type and format to match Created_Date (this avoids having CONVERT called explicitly in the WHERE clause by the parser---very expensive) and compare the fields directly. No function wrapped around the real element, so no hiding of the index.

    Or is it too early for the caffeine to kick in and I'm missing something very obvious?

    Back to the original subject, very good article. I spent a some time myself testing the performance of function calls (intrinsic and UDF) and arrived at the same conclusions. And that is also where I ran into the explicit CONVERT function call in tracing the performance of a WHERE clause.

    ------------
    Buy the ticket, take the ride. -- Hunter S. Thompson