I've read several articles about using data types that support dates in SQL Server but I'm still undecided about what kind of data to use.
All the people says to use the new and powerful datetime2 type but smalldatetime is still more convenient in terms of memory (6 bytes vs 4 bytes)
This is my scope:
A table defined in this way:
Date: typeof(<Date type to choose>)
Value1: typeof(int)
Value2: typeof(int)
Value3: typeof(int)
Then I have these requirements:
for the Date column, I need precision up to minute.
In this table I will store up to 1 million records every day so big big data.
My question is: do I have to use the old smalldatetype that saves me 2 mb every day?
OR
Should I use the new and powerful datetime2 datatype?
Thanks
Date ranges : smalldatetime: 1900-01-01 through 2079-06-06 and datetime2: 0001-01-01 through 9999-12-31
Storage :If you don't need seconds, just hours and minutes then storage is like smalldatetime at 4 bytes, as opposed to datetime2(0) at 6 bytes.
datetime2 is an upgrade in range of values, precision (no rounding!), so you should go with datetime2 for big data.