June 6, 2011 at 3:23 pm
Is there a difference in the index created on a smalldatetime column vs an int column since they are both 4 bytes and internally SQL Server considers a smalldatetime an int?
Donalith
June 6, 2011 at 3:56 pm
Do you mean in functionality or size?
Jason...AKA CirqueDeSQLeil
_______________________________________________
I have given a name to my pain...MCM SQL Server, MVP
SQL RNNR
Posting Performance Based Questions - Gail Shaw[/url]
Learn Extended Events
June 7, 2011 at 9:39 am
Both. Is there functionally an speed difference between the two indexes and/or is there a significant size difference?
Donalith
June 7, 2011 at 9:50 am
4 byte is 4 bytes. Won't make any difference there.
Now the annoyance you'll have is that you'll have to constantly cast it back to smalldatetime for any of the date functions. That alone makes it a bad move.
June 7, 2011 at 9:53 am
Ok. I just wondered if I would be able to save any cpu cycles by storing it as an int since SS2008 stores it internally as an int.
Though now that I think about it, these kind of cycle saves are more indicative of my age, lol, and when cpu power was at a premium.
Viewing 5 posts - 1 through 4 (of 4 total)
You must be logged in to reply to this topic. Login to reply