Answer:
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.
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.
Previous Question | Next Question |
Do you know what are the ways available in SQL Server to execute SQL statements? | Tell me in brief how SQL server enhances scalability of the database system? |