October 28, 2009 at 10:44 am
Bob Hovious 24601 (10/28/2009)
Hey Jason, better go look at that thread again.I stumbled past what looks to be a much cleaner solution from Peter Brinkhaus. We're just waiting on Wayne to tell us if one outperforms the other. I'm actually rooting for Peter's solution, because I think it reads easier because it doesn't have to blend UNPIVOT and CrossTab.
Very interesting. Just compared the two and see nearly the same execution plan (Peters does not require a filter but that was a 0% total cost in Bobs method). They both return in the same amount of time, have the same IO stats - and Bobs is actually a little better performance wise on the Sort. The client statistics are also the same (Bobs sends more bytes but processes just as fast being the difference).
All in all - both process in 15ms on average on my test box.
As for preference, I like the Unpivot just a little bit more - though the initial readability of Peters is better. However, it doesn't take long to figure it out - so I think readability is a wash.
Wayne will have to give the final verdict.
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
October 28, 2009 at 11:58 am
Thanks for the feedback, Jason. I'm going to test them at larger volumes if Wayne doesn't, but that will probably have to wait until after next week.
__________________________________________________
Against stupidity the gods themselves contend in vain. -- Friedrich Schiller
Stop, children, what's that sound? Everybody look what's going down. -- Stephen Stills
October 28, 2009 at 12:04 pm
Y'all may want to take a look at this thread, http://www.sqlservercentral.com/Forums/Topic771369-149-1.aspx as the resolution is a workaround provided by MS for a bug in a HASH MAP JOIN plan.
Jack Corbett
Consultant - Straight Path Solutions
Check out these links on how to get faster and more accurate answers:
Forum Etiquette: How to post data/code on a forum to get the best help
Need an Answer? Actually, No ... You Need a Question
October 28, 2009 at 12:15 pm
for jeff: Generalizing Specialists: Improving Your IT Career Skills
October 28, 2009 at 1:14 pm
I got into an accident yesterday. A four car pile up. Thankfully no one got hurt bad. My whole body is sore. Hit my chest badly on the steering wheel. No broken bones.. 🙂 My car is damaged very badly. The car wont even start now.
-Roy
October 28, 2009 at 1:17 pm
Wow, glad you are "okay" Roy. That's scary. Will pray that you heal up quickly and can get the car fixed/replaced without too much effort.
Jack Corbett
Consultant - Straight Path Solutions
Check out these links on how to get faster and more accurate answers:
Forum Etiquette: How to post data/code on a forum to get the best help
Need an Answer? Actually, No ... You Need a Question
October 28, 2009 at 1:23 pm
Really glad to hear you're okay, Roy. I hope everyone else is going to be alright. Dang, need to generate more good vibes in the Force and split the streams between you and Barry. More training from Lynn is needed, yes.
__________________________________________________
Against stupidity the gods themselves contend in vain. -- Friedrich Schiller
Stop, children, what's that sound? Everybody look what's going down. -- Stephen Stills
October 28, 2009 at 1:35 pm
Bob Hovious 24601 (10/28/2009)
Really glad to hear you're okay, Roy. I hope everyone else is going to be alright. Dang, need to generate more good vibes in the Force and split the streams between you and Barry. More training from Lynn is needed, yes.
I agree with Bob, including the part about more training. Bob, try it without the colander. It may work better that way.
Sorry to hear that Roy. Happy to hear you're ok.
For best practices on asking questions, please read the following article: Forum Etiquette: How to post data/code on a forum to get the best help[/url]
October 28, 2009 at 1:36 pm
Thanks Bob, Jack and Alvin. Went to the insurance today and got that cleared... Just some muscle pain now... 🙂 If the crash was harder, one of the car might have gone over the guard rail down 200 mts of rocky terrain and into the sea... 😀
-Roy
October 28, 2009 at 1:38 pm
Roy Ernest (10/28/2009)
I got into an accident yesterday. A four car pile up. Thankfully no one got hurt bad. My whole body is sore. Hit my chest badly on the steering wheel. No broken bones.. 🙂 My car is damaged very badly. The car wont even start now.
Been in more than my share of accidents (car v car (several), car v motorcycle (yes, twice and I was the motorcyclist), car v ditch (at 70 mph), car v pedestrian (I was the pedestrian)).
Hope you heal quickly and get your car repaired/replaced without too much hassle. I'll keep you in my prayers as well.
October 28, 2009 at 1:44 pm
Lynn Pettis (10/28/2009)
Roy Ernest (10/28/2009)
I got into an accident yesterday. A four car pile up. Thankfully no one got hurt bad. My whole body is sore. Hit my chest badly on the steering wheel. No broken bones.. 🙂 My car is damaged very badly. The car wont even start now.Been in more than my share of accidents (car v car (several), car v motorcycle (yes, twice and I was the motorcyclist), car v ditch (at 70 mph), car v pedestrian (I was the pedestrian)).
Hope you heal quickly and get your car repaired/replaced without too much hassle. I'll keep you in my prayers as well.
As someone who's also been in their fair share of accidents I feel you pain, in more ways than one. Get better soon and good luck with the insurance company.
-Luke.
October 28, 2009 at 1:49 pm
Thanks Lynn and Luke. The Insurance has been taken care off pretty cheap. Just 400 Guilders. Equivalent to 225 USD. So not bad deal. They will go and check the car and let me know if it is a write off or repairable...
-Roy
October 28, 2009 at 2:11 pm
Feel better, Roy. Glad you're OK. Rest and pain reliever
October 28, 2009 at 2:16 pm
Thanks Steve.:-) I am gonna soak myself tonight in hot water. I have pain killers and muscle relaxant.
-Roy
October 28, 2009 at 2:50 pm
Roy Ernest (10/28/2009)
Thanks Steve.:-) I am gonna soak myself tonight in hot water. I have pain killers and muscle relaxant.
Careful mixing the pain killers and the muscle relaxant. My wife was in an accident a while ago and given both, turned out the muscle relaxant was more than enough to knock her on her butt. we both wonder how she would have reacted if she had taken both together as the doctor tolder she could.
Viewing 15 posts - 8,851 through 8,865 (of 66,712 total)
You must be logged in to reply to this topic. Login to reply