SQL Server Performance Series – Avoid Using Datediff

By Navratan Verma

Download the Query used here : DateDiff

Observe the queries used here.

DateDiffImg

Now let us see the query plan and statistics data compare 1st and 2nd query.

DateDiff1_2

Now let us see the query plan and statistics data compare 3rd and 4th query.

DateDiff3_4

Thank you.

Leave a Reply

Your email address will not be published. Required fields are marked *