January 26, 2015 at 4:50 am
ChrisM@Work (1/26/2015)
Your wish etc etc PM me if you're sure and we'll fix it up.
Thanks! But I've already spent the money to build the other costume. Might as well go through with it now. Damn. Wish I'd known. I'm going to keep trying to get my hands on your bows (and no, to the rest of you, that's not a euphemism).
"The credit belongs to the man who is actually in the arena, whose face is marred by dust and sweat and blood"
- Theodore Roosevelt
Author of:
SQL Server Execution Plans
SQL Server Query Performance Tuning
January 26, 2015 at 4:59 am
rodjkidd (1/26/2015)
Chris,Are well it would be good to see you there!
Bracknell - no, I ended at the end of the year. Had a couple of weeks R&R and now looking for the next one. Might have something in Cambridge but it's all gone a bit quiet :O
Rodders...
Having looked at the list of speakers ...bloody hell. Can't not go really. It's dev heaven.
Dominic Adamczyk at Lorien sends out an email on fridays called something like "Something SQL for a Friday" which contains a list of links to interesting SQL stuff and also an industry comment. Last friday's comment was "business is slow but we're expecting it to pick up in a couple of weeks".
For fast, accurate and documented assistance in answering your questions, please read this article.
Understanding and using APPLY, (I) and (II) Paul White
Hidden RBAR: Triangular Joins / The "Numbers" or "Tally" Table: What it is and how it replaces a loop Jeff Moden
January 26, 2015 at 5:05 am
Grant Fritchey (1/26/2015)
ChrisM@Work (1/26/2015)
Your wish etc etc PM me if you're sure and we'll fix it up.Thanks! But I've already spent the money to build the other costume. Might as well go through with it now. Damn. Wish I'd known. I'm going to keep trying to get my hands on your bows (and no, to the rest of you, that's not a euphemism).
I could bring a couple along if you wish, on the friday. There's always the possibility of arranging a private shoot too on sunday. It's a long shot - haha - depends who is available.
For fast, accurate and documented assistance in answering your questions, please read this article.
Understanding and using APPLY, (I) and (II) Paul White
Hidden RBAR: Triangular Joins / The "Numbers" or "Tally" Table: What it is and how it replaces a loop Jeff Moden
January 26, 2015 at 5:08 am
Jeff Moden (1/23/2015)
Sean Lange (1/23/2015)
Jeff Moden (1/23/2015)
Sean Lange (1/23/2015)
Oh lordy...I just handed a stored proc and was asked advice on how to make it faster. The proc is 3700 lines long, there are almost 200 parameters and another 200 variables. I copied the sql to a text file and there are 113 while loops. Hope they don't want this done quickly as a complete rewrite is in my near future.I guess I would ask them what the original requirements are for the code and just start over.
Jeff please pack up your pork chop launcher and head to Kansas City. I am going to need backup on this one. Every single one of those while loops does nothing but increment a counter. All they need to be is a simple count(*) + 1 instead of looping.
And did I mention this procedure repeatedly hits a
tableheap with 27 million rows with the exact same query. :w00t::w00t::w00t:That might be a fun proc to see. Now, before you go pre-optimizing ;-), how long does that sucker take to run?
Just think of the job satisfaction that's coming with this one. Consider the time it takes and lines of code now. When you're done, take a look at the same metrics. My bet it that it'll be a fair amount less in each category.
January 26, 2015 at 5:28 am
Ed Wagner (1/26/2015)
Jeff Moden (1/23/2015)
Sean Lange (1/23/2015)
Jeff Moden (1/23/2015)
Sean Lange (1/23/2015)
Oh lordy...I just handed a stored proc and was asked advice on how to make it faster. The proc is 3700 lines long, there are almost 200 parameters and another 200 variables. I copied the sql to a text file and there are 113 while loops. Hope they don't want this done quickly as a complete rewrite is in my near future.I guess I would ask them what the original requirements are for the code and just start over.
Jeff please pack up your pork chop launcher and head to Kansas City. I am going to need backup on this one. Every single one of those while loops does nothing but increment a counter. All they need to be is a simple count(*) + 1 instead of looping.
And did I mention this procedure repeatedly hits a
tableheap with 27 million rows with the exact same query. :w00t::w00t::w00t:That might be a fun proc to see. Now, before you go pre-optimizing ;-), how long does that sucker take to run?
Just think of the job satisfaction that's coming with this one. Consider the time it takes and lines of code now. When you're done, take a look at the same metrics. My bet it that it'll be a fair amount less in each category.
Honestly, I'd be like a kid at Christmas if someone handed that to me 😀
January 26, 2015 at 5:29 am
GilaMonster (1/26/2015)
Steve Jones - SSC Editor (1/23/2015)
Sioban Krzywicki (1/23/2015)
GilaMonster (1/23/2015)
I haven't got any clue for a costume. Maybe cheat, buy a green hoodie and go as Arrow (but without a bow due to airline luggage restrictions)See if Steve or Grant or someone else who'll be there can pick you up a cheap bow locally and bring it for you. Arrow would be great.
We can arrange something, I'm sure. The RG staff are pretty good at helping.
Decided on something else.
Shopping list:
Toy police badge, preferably NYC
Glove, elbow-length
Thick cardboard
Tin foil
Glass 'gems', red and blue
Any guesses?
Inspector Gadget?
January 26, 2015 at 5:45 am
Brandie Tarvin (1/26/2015)
GilaMonster (1/26/2015)
Steve Jones - SSC Editor (1/23/2015)
Sioban Krzywicki (1/23/2015)
GilaMonster (1/23/2015)
I haven't got any clue for a costume. Maybe cheat, buy a green hoodie and go as Arrow (but without a bow due to airline luggage restrictions)See if Steve or Grant or someone else who'll be there can pick you up a cheap bow locally and bring it for you. Arrow would be great.
We can arrange something, I'm sure. The RG staff are pretty good at helping.
Decided on something else.
Shopping list:
Toy police badge, preferably NYC
Glove, elbow-length
Thick cardboard
Tin foil
Glass 'gems', red and blue
Any guesses?
Inspector Gadget?
Closest I can get is Barricade off of Transformers!
January 26, 2015 at 5:48 am
ChrisM@Work (1/26/2015)
rodjkidd (1/26/2015)
Chris,Are well it would be good to see you there!
Bracknell - no, I ended at the end of the year. Had a couple of weeks R&R and now looking for the next one. Might have something in Cambridge but it's all gone a bit quiet :O
Rodders...
Having looked at the list of speakers ...bloody hell. Can't not go really. It's dev heaven.
Dominic Adamczyk at Lorien sends out an email on fridays called something like "Something SQL for a Friday" which contains a list of links to interesting SQL stuff and also an industry comment. Last friday's comment was "business is slow but we're expecting it to pick up in a couple of weeks".
I know rather impressive line up. I've got to sort out my RM duties from that lot!
Dominic yeah I saw that comment last week 🙂
Rodders...
January 26, 2015 at 6:23 am
ChrisM@Work (1/26/2015)
Grant Fritchey (1/26/2015)
ChrisM@Work (1/26/2015)
Your wish etc etc PM me if you're sure and we'll fix it up.Thanks! But I've already spent the money to build the other costume. Might as well go through with it now. Damn. Wish I'd known. I'm going to keep trying to get my hands on your bows (and no, to the rest of you, that's not a euphemism).
I could bring a couple along if you wish, on the friday. There's always the possibility of arranging a private shoot too on sunday. It's a long shot - haha - depends who is available.
🙁
My flights are such that I have to be at Heathrow around 3pm and I have plans for the morning already.
Gail Shaw
Microsoft Certified Master: SQL Server, MVP, M.Sc (Comp Sci)
SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability
January 26, 2015 at 6:24 am
Gazareth (1/26/2015)
Brandie Tarvin (1/26/2015)
GilaMonster (1/26/2015)
Steve Jones - SSC Editor (1/23/2015)
Sioban Krzywicki (1/23/2015)
GilaMonster (1/23/2015)
I haven't got any clue for a costume. Maybe cheat, buy a green hoodie and go as Arrow (but without a bow due to airline luggage restrictions)See if Steve or Grant or someone else who'll be there can pick you up a cheap bow locally and bring it for you. Arrow would be great.
We can arrange something, I'm sure. The RG staff are pretty good at helping.
Decided on something else.
Shopping list:
Toy police badge, preferably NYC
Glove, elbow-length
Thick cardboard
Tin foil
Glass 'gems', red and blue
Any guesses?
Inspector Gadget?
Closest I can get is Barricade off of Transformers!
No and no. 😀
Gail Shaw
Microsoft Certified Master: SQL Server, MVP, M.Sc (Comp Sci)
SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability
January 26, 2015 at 6:29 am
ChrisM@Work (1/26/2015)
Grant Fritchey (1/26/2015)
ChrisM@Work (1/26/2015)
Your wish etc etc PM me if you're sure and we'll fix it up.Thanks! But I've already spent the money to build the other costume. Might as well go through with it now. Damn. Wish I'd known. I'm going to keep trying to get my hands on your bows (and no, to the rest of you, that's not a euphemism).
I could bring a couple along if you wish, on the friday. There's always the possibility of arranging a private shoot too on sunday. It's a long shot - haha - depends who is available.
Well nuts. Already have plane tickets out on Sunday. I really must arrange a trip with only you in mind... oh, and Red Gate.
"The credit belongs to the man who is actually in the arena, whose face is marred by dust and sweat and blood"
- Theodore Roosevelt
Author of:
SQL Server Execution Plans
SQL Server Query Performance Tuning
January 26, 2015 at 6:37 am
Sean Lange (1/23/2015)
Oh lordy...I just handed a stored proc and was asked advice on how to make it faster. The proc is 3700 lines long, there are almost 200 parameters and another 200 variables. I copied the sql to a text file and there are 113 while loops. Hope they don't want this done quickly as a complete rewrite is in my near future.
I can almost understand 3700 lines, but 113 loops! Wow. I'm sure you'll be able to get it to run much faster, but I'd need a couple of days just to figure out what it is doing. You don't happen to have access to a spec for the original development.
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
January 26, 2015 at 6:43 am
Grant Fritchey (1/26/2015)
ChrisM@Work (1/26/2015)
Grant Fritchey (1/26/2015)
ChrisM@Work (1/26/2015)
Your wish etc etc PM me if you're sure and we'll fix it up.Thanks! But I've already spent the money to build the other costume. Might as well go through with it now. Damn. Wish I'd known. I'm going to keep trying to get my hands on your bows (and no, to the rest of you, that's not a euphemism).
I could bring a couple along if you wish, on the friday. There's always the possibility of arranging a private shoot too on sunday. It's a long shot - haha - depends who is available.
Well nuts. Already have plane tickets out on Sunday. I really must arrange a trip with only you in mind... oh, and Red Gate.
:crying: SQL Bits clashes with our chairman's shoot at Donington Park[/url], quite a way north of London. I'm already booked into the hotel.
For fast, accurate and documented assistance in answering your questions, please read this article.
Understanding and using APPLY, (I) and (II) Paul White
Hidden RBAR: Triangular Joins / The "Numbers" or "Tally" Table: What it is and how it replaces a loop Jeff Moden
January 26, 2015 at 7:08 am
Jack Corbett (1/26/2015)
Sean Lange (1/23/2015)
Oh lordy...I just handed a stored proc and was asked advice on how to make it faster. The proc is 3700 lines long, there are almost 200 parameters and another 200 variables. I copied the sql to a text file and there are 113 while loops. Hope they don't want this done quickly as a complete rewrite is in my near future.I can almost understand 3700 lines, but 113 loops! Wow. I'm sure you'll be able to get it to run much faster, but I'd need a couple of days just to figure out what it is doing. You don't happen to have access to a spec for the original development.
BWAAHAA!!!! Spec docs??? This was written by somebody, nobody really knows who or when. Possibly a consultant somewhere around 10-15 years ago. The database has been upgraded to 2008r2 along the way but it is running in 2k compatibility mode. In further analysis it was determined that the bottleneck appears to be between an appliance and another application. I told them I would be happy to rewrite this anyway since even if it isn't a problem today it is going to be. And even though they don't think it is an issue, it really is and the end users would really appreciate the performance boost. At least for the time being we are not touching this monster. I have to admit I am rather bummed.
_______________________________________________________________
Need help? Help us help you.
Read the article at http://www.sqlservercentral.com/articles/Best+Practices/61537/ for best practices on asking questions.
Need to split a string? Try Jeff Modens splitter http://www.sqlservercentral.com/articles/Tally+Table/72993/.
Cross Tabs and Pivots, Part 1 – Converting Rows to Columns - http://www.sqlservercentral.com/articles/T-SQL/63681/
Cross Tabs and Pivots, Part 2 - Dynamic Cross Tabs - http://www.sqlservercentral.com/articles/Crosstab/65048/
Understanding and Using APPLY (Part 1) - http://www.sqlservercentral.com/articles/APPLY/69953/
Understanding and Using APPLY (Part 2) - http://www.sqlservercentral.com/articles/APPLY/69954/
January 26, 2015 at 7:12 am
Sean Lange (1/26/2015)
Jack Corbett (1/26/2015)
Sean Lange (1/23/2015)
Oh lordy...I just handed a stored proc and was asked advice on how to make it faster. The proc is 3700 lines long, there are almost 200 parameters and another 200 variables. I copied the sql to a text file and there are 113 while loops. Hope they don't want this done quickly as a complete rewrite is in my near future.I can almost understand 3700 lines, but 113 loops! Wow. I'm sure you'll be able to get it to run much faster, but I'd need a couple of days just to figure out what it is doing. You don't happen to have access to a spec for the original development.
BWAAHAA!!!! Spec docs???
What's a spec?
I know I've heard people talk about them, can't recall ever seeing one. Must be some mythical thing like a unicorn.
Gail Shaw
Microsoft Certified Master: SQL Server, MVP, M.Sc (Comp Sci)
SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability
Viewing 15 posts - 47,131 through 47,145 (of 66,712 total)
You must be logged in to reply to this topic. Login to reply