June 12, 2013 at 8:09 pm
Comments posted to this topic are about the item SHOWPLAN_XML
Malleswarareddy
I.T.Analyst
MCITP(70-451)
June 12, 2013 at 11:43 pm
Good back to back questions from Maleshwar 🙂
Thanks 🙂
First I read it from BOL before answering it and got correct :-P:-)
_______________________________________________________________
To get quick answer follow this link:
http://www.sqlservercentral.com/articles/Best+Practices/61537/
June 13, 2013 at 12:24 am
kapil_kk (6/12/2013)
Good back to back questions from Maleshwar 🙂Thanks 🙂
+1
~ Lokesh Vij
Link to my Blog Post --> www.SQLPathy.com[/url]
Follow me @Twitter
June 13, 2013 at 1:09 am
Boy, how do I hate questions like this. No wait, the question is okay, it's the answer options.
If the question is "how many rows", the answer options should be numbers. All of them. Otherwise, you run the risk of having multiple correct options.
As happens here. Because of the showplan option, the statement will be compiled and not executed. That is one of the options (though technically not an answer to the question).
The result of that compilation will then be returned in XML form. That XML is embedded in a result set that has a single column and a single row. So the correct answer is also one. Sheesh!
Given my utter lack of mindreading skills, I flipped a coin. And I got lucky this time, so I picked the correct answer. Which is a good thing - I expect to see a lot of responses from people demanding their point, so now I have one to give away to them - last time I tried, the local supermarket didn't accept them as payment, so I don't really need them anyway.
This (badly formulated answers making multiple options correct) has happened too often recently. (No I have no statistics, this comment is based on gut feeling). Question authors, I really appreciate all you do - but before submitting, please take a minute to review the question, and checkk to make sure there is no confusion possible. (And while you're at it, how about copy/popaste the code to a server with a case sensitive collation and a locale setting other then the one you normally use to check if it runs there as well - not an issue with today's question, but I'm in a rant anyway so I'll just spill all).
Okay, rant is out. Malls, thanks for your question. Despite its flaws, it is an informative question and I'm sure there will be people learning from it.
June 13, 2013 at 1:34 am
"Given my utter lack of mindreading skills, I flipped a coin. And I got lucky this time, so I picked the correct answer. Which is a good thing - I expect to see a lot of responses from people demanding their point, so now I have one to give away to them - last time I tried, the local supermarket didn't accept them as payment, so I don't really need them anyway."
I flipped lost -- Meh its only a point so keep it I can't do anything with it other than go oooooo I got lots of points now.:w00t:
Hope this helps...
Ford Fairlane
Rock and Roll Detective
June 13, 2013 at 2:08 am
This was removed by the editor as SPAM
June 13, 2013 at 2:42 am
First I read it from BOL before answering it and got correct :-P:-)
Usually, looking up the answer first and still getting it wrong would be a cause of concern but, in this case, it was still possible.
June 13, 2013 at 3:39 am
Another wrong coin flip...
I had never seen this option before so had to read it up which is great; it is the whole point of doing these questions - to learn new stuff.... so I appreciate the question.
But the processing of the statement had better return exactly one row containing the XML in which the execution plan is described otherwise the system isn't working.
At the same time the statement itself is not executed.
heads or tails...?
June 13, 2013 at 4:05 am
Another wrong coin flip...
Just chose the wrong correct answer... still get my point?
June 13, 2013 at 4:43 am
I also did not do too well on my coin flip!!! Do I get another go.....best of three perhaps...:-P
June 13, 2013 at 4:59 am
Hugo Kornelis (6/13/2013)
Boy, how do I hate questions like this. No wait, the question is okay, it's the answer options.If the question is "how many rows", the answer options should be numbers. All of them. Otherwise, you run the risk of having multiple correct options.
As happens here. Because of the showplan option, the statement will be compiled and not executed. That is one of the options (though technically not an answer to the question).
The result of that compilation will then be returned in XML form. That XML is embedded in a result set that has a single column and a single row. So the correct answer is also one. Sheesh!
Given my utter lack of mindreading skills, I flipped a coin. And I got lucky this time, so I picked the correct answer. Which is a good thing - I expect to see a lot of responses from people demanding their point, so now I have one to give away to them - last time I tried, the local supermarket didn't accept them as payment, so I don't really need them anyway.
This (badly formulated answers making multiple options correct) has happened too often recently. (No I have no statistics, this comment is based on gut feeling). Question authors, I really appreciate all you do - but before submitting, please take a minute to review the question, and checkk to make sure there is no confusion possible. (And while you're at it, how about copy/popaste the code to a server with a case sensitive collation and a locale setting other then the one you normally use to check if it runs there as well - not an issue with today's question, but I'm in a rant anyway so I'll just spill all).
...
+1. My coin flip was wrong...
June 13, 2013 at 5:12 am
Can't see how any coin flip was needed. One interpretation resulted in 2 correct answers, which wasn't an option. So the other interpretation had to be correct.
June 13, 2013 at 5:34 am
technically it does return a row. Not a row from the tables but a row that is the link to the xml editor.
add 3 row to staging
(3 row(s) affected)
add 3 rows to OLTP
(3 row(s) affected)
returns 1 row from select. link to the xml editor for the plan.
(1 row(s) affected)
and yes I got it wrong.
ToddR
June 13, 2013 at 5:57 am
Hugo Kornelis (6/13/2013)
Boy, how do I hate questions like this. No wait, the question is okay, it's the answer options.
+ a bunch!
June 13, 2013 at 6:14 am
As happens here. Because of the showplan option, the statement will be compiled and not executed. That is one of the options (though technically not an answer to the question).
The result of that compilation will then be returned in XML form. That XML is embedded in a result set that has a single column and a single row. So the correct answer is also one. Sheesh!
This was the reason I decided to go for the 'It will return one row'-option. I'm a bit dissapointed I was not rewarded for giving a correct answer. Interesting subject though.
Viewing 15 posts - 1 through 15 (of 34 total)
You must be logged in to reply to this topic. Login to reply