According to this articlethe documentation https://msdn.microsoft.com/en-us/library/bb677335.aspx
.datetime2 (Transact-SQL):
Storage size 6Storage size
6 bytes for precisions less than 3; 73.
7 bytes for precisions 3 and 4. All
All other precisions require 8 bytes.
The size of dateTime2datetime2(0)
, dateTime2datetime2(1)
, dateTime2datetime2(2)
use use the same amount of storage. (6 Bytesbytes).
Would I be correct in saying that I might as well go with dateTime2datetime2(2)
and gain the benefit of the precision without any additional size costs.?
Please note:
- This column is indexed with the
PK
PK to form a compound Clustered Index.clustered index (used for table partitioning) - I do-not not care about milliseconds
Would 'dateTime2(0)'datetime2(0)
be more cpu efficient when being used in ana where queryclause, or when seeking through an index.?
This is a massive table, so the smallest optimization will make a big difference.