question

Celestial avatar image
Celestial asked

DateTime and Decimal data types space handling!

Hi, I have come to know that Date Time and Decimal data types occupy fixed space even if they do not have data in them. I have a case in which i have too many Decimal and Date Time columns in my table which in most of the cases are NULL (80%). due to this, it consumes too much space. I wanted to know if there is any way to minimize this space consumption ? is it possible through Partitioning or created Detailed Tables for this? Your help is appreciated.
datetimedecimal
10 |1200

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

1 Answer

·
Kev Riley avatar image
Kev Riley answered
You could look into using [sparse columns][1]. There is a trade off against the space needed for non-null values, but at your levels (80%) seem to be well above the thresholds that MS publish. [1]: http://msdn.microsoft.com/en-us/library/cc280604.aspx
10 |1200

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Write an Answer

Hint: Notify or tag a user in this post by typing @username.

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.