June 14, 2013 at 8:05 am
My apologies. I think I cut and pasted the drop in the wrong spot when this was proofed. It definitely ran correctly when it was tested.
I will award points back to those who have attempted it already.
June 14, 2013 at 9:08 am
The question is interesting but I do wonder why would someone would disable a clustered index?
June 14, 2013 at 9:46 am
Interesting, very interesting - thanks, Chirag!
June 14, 2013 at 10:50 am
Steve Jones - SSC Editor (6/14/2013)
My apologies. I think I cut and pasted the drop in the wrong spot when this was proofed. It definitely ran correctly when it was tested.I will award points back to those who have attempted it already.
Thanks very much Steve..
June 14, 2013 at 11:13 am
L' Eomot Inversรฉ (6/14/2013)
This would have been a good question if the author had checked that it produced the expect result before he submitted it, and corrected it when he discovered that instead of 3 rows the select returned an error. As it is, it's not actually as bad as yesterday's question, but it's not really very good either.
Agree Tom - hence my question earlier
-------------------------------Posting Data Etiquette - Jeff Moden [/url]Smart way to ask a question
There are naive questions, tedious questions, ill-phrased questions, questions put after inadequate self-criticism. But every question is a cry to understand (the world). There is no such thing as a dumb question. โ Carl Sagan
I would never join a club that would allow me as a member - Groucho Marx
June 14, 2013 at 12:51 pm
Good question... apparently especially after Steve fixed it.
๐
June 14, 2013 at 12:53 pm
Luis Cazares (6/14/2013)
The question is interesting but I do wonder why would someone would disable a clustered index?
ETL loads is one reason. It can be faster to load without indexes and rebuild.
This question shows what might happen if you didn't enable the index later.
June 14, 2013 at 1:01 pm
Steve Jones - SSC Editor (6/14/2013)
Luis Cazares (6/14/2013)
The question is interesting but I do wonder why would someone would disable a clustered index?ETL loads is one reason. It can be faster to load without indexes and rebuild.
That would be the reason for disabling nonclustered indexes. Disabling a clustered index prevents all access to the table, both reads and writes. So the ETL job would fail.
June 14, 2013 at 1:09 pm
Thanks for the correction, Hugo. Moving too fast today.
Not sure why you would disable a clustered index then. Perhaps it was included to keep consistent syntax for all indexes? Seems strange.
June 14, 2013 at 2:51 pm
Nice question. I got to it after it had been corrected and everything made sense. Glad I didn't have to guess as others did earlier!
June 14, 2013 at 5:54 pm
Steve Jones - SSC Editor (6/14/2013)
Thanks for the correction, Hugo. Moving too fast today.Not sure why you would disable a clustered index then. Perhaps it was included to keep consistent syntax for all indexes? Seems strange.
Just syntax consistency, I imagine. If there had been an idea to disable a table, there would have been a "disable table" command to cope with heaps as well as tables with CIs, probably.
Tom
June 17, 2013 at 2:51 am
Luis Cazares (6/14/2013)
The question is interesting but I do wonder why would someone would disable a clustered index?
They wouldn't - but the question shows you what would happen if they inadvertently tried it ๐
June 17, 2013 at 1:10 pm
L' Eomot Inversรฉ (6/14/2013)
This would have been a good question if the author had checked that it produced the expect result before he submitted it, and corrected it when he discovered that instead of 3 rows the select returned an error. As it is, it's not actually as bad as yesterday's question, but it's not really very good either.
Tend to agree here.
Jason...AKA CirqueDeSQLeil
_______________________________________________
I have given a name to my pain...MCM SQL Server, MVP
SQL RNNR
Posting Performance Based Questions - Gail Shaw[/url]
Learn Extended Events
June 21, 2013 at 4:35 am
They wouldn't - but the question shows you what would happen if they inadvertently tried it ๐
Agreed | Good question - thanks for sharing ๐ +1
MCTS | MCITP | Microsoft SQL Server 2008 Administration & Development
MCSA | MCSE | Business Intelligence SQL Server 2012
June 25, 2013 at 1:02 am
I found it simple and good question for QOTD. ๐
Viewing 15 posts - 16 through 29 (of 29 total)
You must be logged in to reply to this topic. Login to reply