Two years ago I wrote a post that got a lot of traction in the comments at the time. Last month there was renewed interest because one of the commenters noted that the official SQL Server documentation for
DATETIME2disagreed with my assertions, and that I was under-representing the storage requirements.
To remind you, I have been saying for years that you can use
DATETIME2(3)as a drop-in replacement for
DATETIME, and have better granularity (1ms versus 3ms) for 12.5% less storage (1 byte per column per row). The commenter intimated that because my statement conflicted with the documentation, that I must be wrong. As it turns out the documentation was wrong, but I also learned something new in the process!
It’s an interesting internal look at how difficult it is to get documentation right, even on something which sounds simple.