SqlShare.com Logo
 
Skip Navigation Links
Home
Video List
Events
Classes
About Us
Login / Register
Subscribe RSS Feed 

Confio Ignite 8

Sparse Columns in SQL Server 2008

Sparse columns optimize data storage for null values in SQL Server 2008. This video introduces you to sparse columns in SQL Server 2008.

Duration:
2 mins 55 secs
Skill Level:
100
Rating:
4.05 out of 5
Publish Date:
November 06, 2008
Sparse Columns in SQL Server 2008 You must be logged in to view this video.  
Bookmark and Share
 
1=Poor, 3=Good, 5=Excellent

About the Author

Image of Plamen Ratchev
Plamen Ratchev has over two decades experience in the software architecture and development field. He has enjoyed building solutions for UNIX, DOS and Windows platforms, with main focus on SQL Server since version 4.21. Plamen is founder of Tangra, specializing in relational database applications analysis, implementation, and tuning. His particular interest is in design patterns, performance a...

References

There are no downloads or recommended reading links for this video

Comments
Greg Dixon on 1/9/2009
Some quantitative data on benefits of sparse columns vs non sparse.

chapas on 1/9/2009
The spoken language is not very clear.

Plamen Ratchev on 1/9/2009
Greg, please read the topic Estimated Space Savings by Data Type in SQL Server Books Online. It provides some statistics. Here is the link: http://technet.microsoft.com/en-us/library/cc280604.aspx

E20CF1E7B8 on 1/9/2009
A good look at a relatively unknown feature.

Edward Thompson on 1/9/2009
Difficult to understand though the thick accent. A solution might be to add a notes area to the viewer that contains the text of what is being said, like closed captioning, Second Audio, or subtitles. Other than that; the content was helpful.

Shawn Old on 1/9/2009
Its nice to see little short videos of new functionality. Thanks.

Carla Wilson on 1/12/2009
I think the filtered index feature would have been good to show in your code.

Plamen Ratchev on 1/13/2009
Carla, here is a link to video that has discussion on filtered indexes: http://www.jumpstarttv.com/filtered-indexes-in-sql-server-2008_518.aspx

Jason Willis on 10/29/2010
An example of space saved would make a more complete short.

Faisal Lodhi on 10/29/2010
Learned SOmething New...thanks,

Alexander on 10/29/2010
very nice video

Charles Rich on 10/29/2010
The guy making the presentation was good, but your regular presenter was a little easier to understand.

Bridget on 10/29/2010
Really liked the quiz afterward. The font in the review pane was easy to read.

bam on 10/29/2010
Never heard of SPARSE columns before. Thanks.

zahid on 10/29/2010
bgfdgfgf

Hansjörg on 10/30/2010
To the point! What about indexing a sparse column - anything special besides the mentioned the WHERE option for the index?

ranu on 10/30/2010
nice..

Erika on 10/30/2010
good

Charlie Bruno on 10/31/2010
Good topic. At times the speaker was a bit difficult to understand. Thanks for keeping the rest of us educated, up to date and aware of various SQL Server features.

Good and New Concepts

B on 11/1/2010
Very difficult to under what he was saying because of his thick accent. Sorry...

Rob Schripsema on 11/1/2010
Doesn't really say how a SPARSE column is beneficial vs. a column that is simply NULLABLE. Is it simply the couple of bytes that a NULL (non-SPARSE) column still requires when the value is NULL, vs. 0 bytes for a SPARSE column?

Audrey Michiels on 11/1/2010
Content is very good. But the recording sound is not clear.

Plamen Ratchev on 11/1/2010
Hi Hansjörg, there is nothing special about indexing SPARSE columns. They work very well with filtered indexes because you can easily filter out the NULLs making the index lean and more efficient.

Plamen Ratchev on 11/1/2010
Hi Rob Schripsema, you are correct. The difference between regular NULLable columns and SPARSE columns is that when the SPARSE column has NULL value it takes 0 bytes of storage, otherwise it takes space. On a very large table with many such columns this can make a big impact.

GParvathesam on 11/1/2010
-

very hard to understand what was being said

erhan emre on 11/3/2010
Bad.

shahzad on 11/21/2010
only theory

thierry on 11/29/2010
some examples would be nice as well as some real-world figures showing just how much space you can gain. Are there no downsides? For example if you insert null but later do add some data to the column with an update, does it take longer than if the column would not have been null in the first place?

Plamen Ratchev on 11/30/2010
Thierry, the BOL topic for SPARSE columns usage (http://technet.microsoft.com/en-us/library/cc280604.aspx) has some pretty good figures on space saving based on data type and percentage of NULLs. There is some overhead on maintaining and retrieving sparse column values (especially non-NULLs), but should not be significant to cause performance issues.

Nick on 1/27/2011
Yep. I think it would have been even better to juxtapose the number of bytes storing a non-sparse column null requires.

Jonathan on 1/27/2011
Interesting feature. Not something I would use very regularly though.

Pareed on 1/27/2011
Thank for sharing this learning little by little

George Clay on 1/27/2011
Very good explanation of sparse columns.

George Heinrich on 1/28/2011
A little more background on the sparse column would have been good...e.g. how do they work "under the covers", why do they take 4 extra bytes of space when there is data, what happens when all 30,000 columns have data? Would it error? Also, I found the accent of the narrator a little difficult to understand.

Mark Jones on 1/28/2011
How much space does a NULL take in a VARCHAR(30) NULL vs. a VARCHAR(30) SPARSE NULL?

Don Gilman on 1/28/2011
MORE PLEASE

SAy Soukamneuth on 1/28/2011
good

Plamen Ratchev on 1/29/2011
Mark Jones, storing a NULL in "VARCHAR(30 NULL" requires at least 2 bytes in the column offset array, while storing a NULL in "VARCHAR(30) SPARSE NULL" requires 0 bytes. Kalen Delaney has a very detailed explanation in the Microsoft SQL Server 2008 Internals book.

Jason Corley on 1/31/2011
You mentioned about it helping filtered index? I don't quite get it as if the filtered index specifies NOT NULL in the WHERE clause, then only rows that have values will end up in the index. Or do the benefits come from creating the index as it is faster to created with this enhancement?

Plamen Ratchev on 2/1/2011
Jason, correct - when you use filtered index with predicate "column IS NOT NULL" the index becomes very efficient because it includes only real values and excludes NULLs. If you use regular index on the column then it includes the NULLs and it is not as useful/efficient.

Maurice Ivory on 2/9/2011
I some stuff from this, Especially since my group has started using Sharepoint more and more.

Mike on 2/22/2011
very concise, good video. this was much improved over the Sparse column presentation that used XML in the example

Maurice Ivory on 5/12/2011
I like this one it can help me out on my current project.

Jim Stofer on 6/21/2011
Did not know that! Thanks!

Robert McCormick on 6/21/2011
It would have been nice if the performance effects of sparse columns were mentioned.

A4A72D151B on 6/21/2011
have not migrated to 2008. but learning more about it is helpful

Dan on 6/21/2011
Needs better description of sparsity and its implementation by MSoft

Dan on 6/21/2011
Needs better description of sparsity and its implementation by MSoft

Dean Dodson on 6/21/2011
Besides "being a great new feature of SQL Server 2008," what are the benefits? I'll investigate on my own and appreciate the introduction to SPARSE columns, but it would have been even more useful to get into more about why it's worth adding the SPARE keyword to a column. Thanks!

D151BB6B9F on 6/21/2011
You talked about indexing differences but didn't show them. An extra 30 seconds would have added a lot of useful/clarifying information.

Michael Neymit on 6/21/2011
Excellent tip! Never heard of "sparse" before".

Carlos B. Vasquez on 6/21/2011
Great job!!!

Mike on 6/21/2011
short and sweet, perfect for this forum. Liked the information about sparse columns not available for certain data types.

Cheryl on 6/22/2011
Excellent! Did not know about SPARSE. Will need to read up on it.

Brad on 6/28/2011
Could not understand the presenter's English.

Che Hsu on 7/11/2011
Thanks for the video

Maurice Ivory on 11/10/2011
This one was excellent, since my company has just started using sharepoint



Must Be Logged In
 

How Do I Become a Video Author? |  Newsletter History

Copyright © Fourdeuce, Inc., 2005-2009. All Rights Reserved | Privacy Policy | Terms & Conditions