Answers

Question and Answer:

  Home  Basic SQL Server

⟩ Explain what are Sparse columns?

Sparse column is a type of column which is used to optimize storage for null values.

When a column there is big number of null then by defining that column as spars column we can save a large amount of disk space.

The drawback of sparse column is that it requires more space for the non null values. When we define a column as sparse it requires additional 4 Byte for not null values.

For example, a DATETIME column in a non-sparse column required 8 bytes of storage whereas if we define that column as a sparse column then it will require 12 bytes.

It is not possible to set ROWGUIDCOL and IDENTITY properties in sparse column.

 173 views

More Questions for you: