Sparse Columns

Posted on January 20, 2008

0


SQL Server 2008 (“Katmai”) introduces something called Sparse Columns. What this allows you to do is to define a column that rarely contains data. When this is defined the column does not take up any space until it is used. An example of the code required to define the column is shown below.

CREATE TABLE Product

(

ProductId INT IDENTITY(1,1)
,ProductName VARCHAR (80)
,
ColourMatch INT SPARSE

)

I will blog more about this features once I have had the chance to play with the CTP 6.

Advertisements