-
Implicit conversions
Hi,
I have a Integer column in a table which is basically the datekey,e.g 20101101.
If I want to get only the year and month from this column is it better to use left(datekey,6) OR datekey/100.
The Left would use implicit conversion.
Which would be faster ?
Thanks !
-
Same cost but datekey/100 uses less cpu time per my test.
Last edited by rmiao; 11-30-2010 at 12:51 PM.
-
My test came up with the same plan in both the cases as well.
So in general, would implicit conversions always be slower ?
Thanks !
-
Maybe number of rows affected have play here.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
|