May 27, 2010 at 2:28 am
i want to storage datetime as :
DATETIME 8 bytes
Or
bigint 8 Bytes
both of 8 bytes
will there be diffrence in the Index size? in performance?
Thanks
Peleg
May 27, 2010 at 2:56 am
If it's a datetime, store it as a datetime. If it's just a date, consider the DATE datatype since you're using 2008.
That way you get data validation (20100231 being correctly identified as invalid), you don't get all sorts of data conversion problems, and you can use the datetime functions without needing casts and converts everwhere.
Gail Shaw
Microsoft Certified Master: SQL Server, MVP, M.Sc (Comp Sci)
SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability
Viewing 2 posts - 1 through 1 (of 1 total)
You must be logged in to reply to this topic. Login to reply