MS SQL: maximum sparse column count with non-null value in a table

164 views Asked by At

I'm trying to find out the space sql server 2008 allocates for sparse columns. The values documented in https://msdn.microsoft.com/en-us/library/cc280604(v=sql.100).aspx seem to be wrong.

When I create a table with a bigint as pk and the rest all sparse columns and then fill each sparse column with value 1, I am able to create a table with

1124 bit columns or 800 int columns or 1000 nvarchar(255) columns.

So it looks like that a bit uses 7 bytes, an int 10 bytes and a nvarchar with 1 char 8 bytes. This is 2 bytes more than documented in the docs.

Any ideas? Am I wrong or the docs?

Thank you

0

There are 0 answers