SQL Server with Mr. Denny

Apr 7 2008   11:00AM GMT

SQL Server 2008 changes the way that CONVERT/CAST works



Posted by: mrdenny
SQL, Query tuning, SQL Server 2008

Normally when running a query against a table and using a CAST or CONVERT function against a datetime field any index is made useless.  In SQL Server 2008 this problem is fixed.  Microsoft has come up with a way for SELECT statements which use CAST or CONVERT against a column of the datetime datatype to continue to use the index.  Now keep in mind that this only works for the datetime datatypes and not other data types.

I believe that this feature showed up in CTP 5 (November).

Denny

Comment on this Post


You must be logged-in to post a comment. Log-in/Register

MarlonR  |   Apr 9 2008   6:47AM GMT

Denny,

I was expecting to see your name on the presenter’s list for the SQL LEARNING DAY in the FireStarter Event on May in Irvine MTC. I didn’t see your name. Check it out <a href="http://www.firestarterevents.com/Presenters/tabid/57/Default.aspx" title="http://www.firestarterevents.com/Presenters/tabid/57/Default.aspx" target="_blank">http://www.firestarterevents.com/Present…</a>

I hope you can expound more on the new feautures of SQL 2008 with real world examples…

-Marlon Ribunal


 

Mrdenny  |   Apr 10 2008   1:45AM GMT

Marlon,
This is the first that I’ve heard about this event. I’ll see what I can do about getting on the schedule to speak at it. I’ll see how booked the schedule is. Thanks for letting me know about it.

Denny