September 1, 2016 at 11:46 pm
Comments posted to this topic are about the item Will It Compress?
September 2, 2016 at 1:57 am
SPARSE is not a datatype but a property.
So, the correct answer is wrong!
SELECT * FROM sys.types
WHERE is_user_defined='0'
September 2, 2016 at 2:03 am
"we attempt to compress the table using this statement: sp_estimate_data_compression_savings ..." is wrong because the sp "sp_estimate_data_compression_savings" just is an "estimate" and it doesn't compress anything!
September 2, 2016 at 2:38 am
This was removed by the editor as SPAM
September 2, 2016 at 4:21 am
Carlo Romagnano (9/2/2016)
SPARSE is not a datatype but a property.....
+1
There's nothing in the question that suggests that there are SPARSE columns. It's not something that would jump out from 'all possible datatypes' either. As far as I could see, there are no datatypes that are incompatible with compression.
The answer might as well have been 'fooled you, the server was unplugged.'
At least Andy's back on form. I was getting worried because I've got a couple of his recent ones right π
How to post a question to get the most help http://www.sqlservercentral.com/articles/Best+Practices/61537
September 2, 2016 at 4:27 am
BWFC (9/2/2016)
Carlo Romagnano (9/2/2016)
SPARSE is not a datatype but a property.....+1
There's nothing in the question that suggests that there are SPARSE columns. It's not something that would jump out from 'all possible datatypes' either. As far as I could see, there are no datatypes that are incompatible with compression.
The answer might as well have been 'fooled you, the server was unplugged.'
At least Andy's back on form. I was getting worried because I've got a couple of his recent ones right π
+1
September 2, 2016 at 4:31 am
excellent question...
But sparse column is not a data type its a property on a column, it was very hard to think that way, got the answer wrong but it was definitely a good learning though specifying sparse column would have made easier to answer..!!
September 2, 2016 at 5:32 am
+1 Sparse is not a datatype.
September 2, 2016 at 5:58 am
Carlo Romagnano (9/2/2016)
SPARSE is not a datatype but a property.So, the correct answer is wrong!
SELECT * FROM sys.types
WHERE is_user_defined='0'
THIS.
I understand why Andy didn't specify SPARSE, as that would be a giveaway. I also understand why he didn't open it up to all properties/ attributes, as then it would get way too complex (do we count a sampling of the different possible lengths of CHAR() and NCHAR() for example?)
So I think this is one of those interesting questions that doesn't work as a QotD.
September 2, 2016 at 6:41 am
Carlo, agree that "we attempt to compress the table using" should have been said differently.
September 2, 2016 at 6:48 am
Good morning all and happy Friday! I agree that sparse isn't a data type - funny how you can think it and write it and still miss the obvious. Clearly I could have done better. If it was "all datatypes and attributes" it would have been closer, but still tough to figure out. My goal is never to write a "gotcha", just to challenge you to see the whole board.
Thanks for trying the question and all the comments, always appreciated.
September 2, 2016 at 7:59 am
I missed it for a different reason. I was guessing he intended sparse column so I knew it wouldn't compress but the statement isn't the cause of the error. The cause of the error is the column in the table so my thoughts were answer one and the last as correct. I had switch from answer two to one. Shoots self in foot for second guessing...
September 2, 2016 at 1:03 pm
I do not regret that I have got it wrong. I learned something new, thanks Andy. π
The question has been imprecise specified, because only SQL Server Enterprise Edition
supports Data Compression and DB Engine SPROC sp_estimate_data_compression_savings.
So e.g. in the MS SQL 2014 Standard command ends with errors Msg 534 and Msg 7738.
At last, I did not consider Sparse column as the data type.
September 2, 2016 at 2:18 pm
Carlo Romagnano (9/2/2016)
SPARSE is not a datatype but a property.So, the correct answer is wrong!
SELECT * FROM sys.types
WHERE is_user_defined='0'
I agree - SPARSE has nothing to do with type.
Tom
September 2, 2016 at 2:19 pm
sipas (9/2/2016)
BWFC (9/2/2016)
Carlo Romagnano (9/2/2016)
SPARSE is not a datatype but a property.....+1
There's nothing in the question that suggests that there are SPARSE columns. It's not something that would jump out from 'all possible datatypes' either. As far as I could see, there are no datatypes that are incompatible with compression.
The answer might as well have been 'fooled you, the server was unplugged.'
At least Andy's back on form. I was getting worried because I've got a couple of his recent ones right π
+1
And + another 1
Tom
Viewing 15 posts - 1 through 15 (of 17 total)
You must be logged in to reply to this topic. Login to reply