Log in
::
Register
::
Not logged in
Home
Tags
Articles
Editorials
Stairways
Forums
Scripts
Videos
Blogs
QotD
Books
Ask SSC
SQL Jobs
Training
Authors
About us
Contact us
Newsletters
Write for us
Recent Posts
Recent Posts
Popular Topics
Popular Topics
Home
Search
Members
Calendar
Who's On
Home
»
Article Discussions
»
Article Discussions by Author
»
Discuss content posted by Saurabh Dwivedy
»
Sparse Columns
13 posts, Page 1 of 2
1
2
»»
Sparse Columns
Rate Topic
Display Mode
Topic Options
Author
Message
Saurabh Dwivedy
Saurabh Dwivedy
Posted Thursday, March 04, 2010 8:32 PM
SSC-Addicted
Group: General Forum Members
Last Login: Thursday, January 05, 2012 2:05 AM
Points: 488,
Visits: 335
Comments posted to this topic are about the item
Sparse Columns
Saurabh Dwivedy
___________________________________________________________
My Blog:
http://tinyurl.com/dwivedys
For better, quicker answers, click on the following...
http://www.sqlservercentral.com/articles/Best+Practices/61537
Be Happy!
Post #877349
bitbucket-25253
bitbucket-25253
Posted Thursday, March 04, 2010 9:48 PM
SSCertifiable
Group: General Forum Members
Last Login: Today @ 12:39 PM
Points: 5,103,
Visits: 20,220
Good question .... learned something from it ...
Thanks
If everything seems to be going well, you have obviously overlooked something.
Ron
Please help us, help you -before posting a question please
read
Before posting a performance problem please
read
Post #877361
SQLRNNR
SQLRNNR
Posted Thursday, March 04, 2010 10:10 PM
SSCoach
Group: General Forum Members
Last Login: Yesterday @ 10:25 AM
Points: 18,754,
Visits: 12,337
Thanks Saurabh, I learned something about sparse columns today.
Jason
AKA CirqueDeSQLeil
I have given a name to my pain...
MCM SQL Server 2008
SQL RNNR
Posting Performance Based Questions - Gail Shaw
Posting Data Etiquette - Jeff Moden
Hidden RBAR - Jeff Moden
VLFs and the Tran Log - Kimberly Tripp
Post #877369
jshailendra
jshailendra
Posted Friday, March 05, 2010 12:13 AM
Old Hand
Group: General Forum Members
Last Login: Friday, December 21, 2012 5:24 AM
Points: 366,
Visits: 436
Good question....learnt from it...tnx
Post #877427
keyur.patel
keyur.patel
Posted Friday, March 05, 2010 12:25 AM
SSC-Enthusiastic
Group: General Forum Members
Last Login: Wednesday, September 28, 2011 7:06 AM
Points: 151,
Visits: 20
I can get clear idea for this.
Thanks,
Keyur Patel
Post #877432
Stewart "Arturius" Campbell
Stewart "Arturius" Campbell
Posted Friday, March 05, 2010 12:25 AM
Hall of Fame
Group: General Forum Members
Last Login: 2 days ago @ 8:31 AM
Points: 3,129,
Visits: 4,312
Nice question about a seldom-used part of SQL Server.
Learned something new myself.
____________________________________________
Space, the final frontier? not any more...
All limits henceforth are self-imposed.
“libera tute vulgaris ex”
Post #877433
ziangij
ziangij
Posted Friday, March 05, 2010 3:50 AM
SSCommitted
Group: General Forum Members
Last Login: Friday, May 17, 2013 2:53 AM
Points: 1,530,
Visits: 359
sorry for sounding stupid, but has anybody implemented sparse in his/her code ?
what was the reasoning behind.. is it really worth ?
Post #877511
Cliff Jones
Cliff Jones
Posted Friday, March 05, 2010 7:52 AM
Hall of Fame
Group: General Forum Members
Last Login: Yesterday @ 3:56 PM
Points: 3,400,
Visits: 3,411
This is good information. Thanks for the question.
Post #877657
Jamie Longstreet-481950
Jamie Longstreet-481950
Posted Friday, March 05, 2010 9:22 AM
SSCrazy
Group: General Forum Members
Last Login: Wednesday, May 22, 2013 8:48 AM
Points: 2,440,
Visits: 714
Guess I am a bit confused by the question
A sparse column must be nullable and cannot have the ROWGUIDCOL or IDENTITY properties. A sparse column cannot be of the following data types: text, ntext, image, timestamp, user-defined data type, geometry, or geography; or have the FILESTREAM attribute.
I'm not sure how something is "defined on them", it may have had a meaning different than the one I read into it. It is clear that a Sparse Column cannot have a Filestream attribute.
There have been times in the past when my sparse sql skills prompted me to look at a Union statement when trying to compare two values that would have best been seen in a left join. The sparse column would have come in handy. It is a good topic. I wonder if we can just reword it slightly... maybe "Can a sparse column have a FileStream Attibute?"
Jamie
Post #877739
Oleg Netchaev
Oleg Netchaev
Posted Friday, March 05, 2010 7:04 PM
SSCommitted
Group: General Forum Members
Last Login: Tuesday, May 21, 2013 10:53 AM
Points: 1,662,
Visits: 1,709
ziangij (3/5/2010)
sorry for sounding stupid, but has anybody implemented sparse in his/her code ?
what was the reasoning behind.. is it really worth ?
Implementation of the sparse column makes sense only if the data in the column is, well, sparse. This is because it takes more space to store not null values in the sparse columns. For example, character types, such as char and varchar need twice as many bytes to store not null data if the column is defined as sparse. For those types only if 60% or more of all records are nulls then it makes sense to define the respective columns as sparse. For example, many databases storing consumer/customer/person records might end up having a column storing data for so-called
address line 2
which will not have any data in the majority of records, which makes such column a good candidate to be defined as sparse.
Oleg
Post #878045
« Prev Topic
|
Next Topic »
13 posts, Page 1 of 2
1
2
»»
Permissions
You
cannot
post new topics.
You
cannot
post topic replies.
You
cannot
post new polls.
You
cannot
post replies to polls.
You
cannot
edit your own topics.
You
cannot
delete your own topics.
You
cannot
edit other topics.
You
cannot
delete other topics.
You
cannot
edit your own posts.
You
cannot
edit other posts.
You
cannot
delete your own posts.
You
cannot
delete other posts.
You
cannot
post events.
You
cannot
edit your own events.
You
cannot
edit other events.
You
cannot
delete your own events.
You
cannot
delete other events.
You
cannot
send private messages.
You
cannot
send emails.
You
may
read topics.
You
cannot
rate topics.
You
cannot
vote within polls.
You
cannot
upload attachments.
You
may
download attachments.
You
cannot
post HTML code.
You
cannot
edit HTML code.
You
cannot
post IFCode.
You
cannot
post JavaScript.
You
cannot
post EmotIcons.
You
cannot
post or upload images.
Copyright © 2002-2013 Simple Talk Publishing. All Rights Reserved.
Privacy Policy.
Terms of Use.
Report Abuse.