views:

104

answers:

1

SQL Server 2008 introduces the notion of sparse columns - where only a few of a very large number of rows have a value.

We want to use this concept but the major use is to create a view where the sparse column IS NULL. Not the more usual - NOT IS NULL. Microsoft say the sparse column and associated index is optimized for retrieval of the NOT NULL rows.

Does anyone know if there is a downside to checking for the NULL condition?

+1  A: 

Nice discussion here where he says

Access (read and write) to sparse columns is more expensive, but I haven't been able to find any exact figures on this.

and

As you can see from Books On-Line there is a really useful guide to when to use them for a particular data type e.g. if more than 64% of your values are null in an int column then use sparse columns, and basically the longer the data type the lower the threshold for using sparse columns.

Since this is a new feature, you should definitely do some timing tests.

Noah
Thanks Noah, I was already aware of Andrew Fryer's Blog. But he doesn't answer the question I'm asking. I'm asking if anyone else has done the timings on the creation of the NOT IS NULL views. I guess I'll have to be the guinea pig...
PaoloFCantoni
Please let us know the results, I'm sure every is very interested
Noah