November 23, 2010 at 7:55 am
GilaMonster (11/23/2010)
Jeff Moden (11/22/2010)
Hmmm... reminds me... why did I work 71 hours last week? :blink:I've been wondering much the same recently...
You were wondering why Jeff worked 71 hours last week?
November 23, 2010 at 7:59 am
Greg Edwards-268690 (11/23/2010)
Paul White NZ (11/23/2010)
GilaMonster (11/23/2010)
Anyone up for a challenge?http://www.sqlservercentral.com/Forums/Topic1024140-360-1.aspx
I suspect the developer who said those can't be optimised doesn't know the meaning of the word. Dynamic SQL and lots of NOLOCK to start with.
I would help, but am temporarily (I hope) blind having glanced at the stored procedure in question.
AWE not enabled on an x86 machine with 32GB RAM was another highlight.
Honestly, this place terrifies me sometimes.
I hope your blindness has passed.:-D
I personally liked all the select distincts.
That usually seems to indicate a missing join, or you might need to review the design of the db.
This place sometimes terrifies you? Some of the OP's might be terrified to step in the door at work in the morning.
It's always interesting to wonder if they were part of creating the mess they're in, or they just got stuck with it.
Greg E
I didn't want to suggest reviewing the design because that's a time consuming step, but it looks like a really bad design. All those joins, all those DISTINCTs. Someone good needs to go over this from scratch, starting with design and going on to all the queries. Data integrity needs to be an urgent priority.
--------------------------------------
When you encounter a problem, if the solution isn't readily evident go back to the start and check your assumptions.
--------------------------------------
It’s unpleasantly like being drunk.
What’s so unpleasant about being drunk?
You ask a glass of water. -- Douglas Adams
November 23, 2010 at 8:05 am
Oddly enough, I know a lot of DBAs & Devs who use SELECT DISTINCT out of nothing more habit. It's not that they need to do it. They just assume it's part of every query.
It's a habit I had to break myself out of a few years back.
November 23, 2010 at 8:05 am
CirquedeSQLeil (11/23/2010)
Grant Fritchey (11/23/2010)
Paul White NZ (11/23/2010)
GilaMonster (11/23/2010)
Anyone up for a challenge?http://www.sqlservercentral.com/Forums/Topic1024140-360-1.aspx
I suspect the developer who said those can't be optimised doesn't know the meaning of the word. Dynamic SQL and lots of NOLOCK to start with.
I would help, but am temporarily (I hope) blind having glanced at the stored procedure in question.
AWE not enabled on an x86 machine with 32GB RAM was another highlight.
Honestly, this place terrifies me sometimes.
I see how you consultants keep making money though. Seems like these shops are mushrooms. They're springing up all over the place.
There was so much low hanging fruit in that query...
It sure makes the jump to consulting look appetizing. If, as a consultant, one only needs to pick out the low hanging fruit to provide performance gains, you could be busy all the time just making the little changes.
I've seen lots of consultants do that and leave without actually fixing the problems. They just tweak things to make it look better for awhile. If you make the jump to conslulting and you want to be a good consultant, expect to go from business to business getting databases that were written by people who knew Excel and figured "how much harder could it be to make a database?" You'll get to redesign the whole database, do the ETL and at the very least hand-hold the developers in matching their interfaces to the new structure. Of course, in smaller shops you'll get to do the programming yourself in VB or C# or C++ or ASP or what have you.
The added bonus is that the whole time you're doing this, management will be asking you why it isn't done yet since the guy who created it didn't take this long. They'll also be complaining, either to you or silently to themselves, that you cost too much.
Still sound appealing? : -)
--------------------------------------
When you encounter a problem, if the solution isn't readily evident go back to the start and check your assumptions.
--------------------------------------
It’s unpleasantly like being drunk.
What’s so unpleasant about being drunk?
You ask a glass of water. -- Douglas Adams
November 23, 2010 at 8:21 am
GilaMonster (11/23/2010)
Grant Fritchey (11/23/2010)
I see how you consultants keep making money though. Seems like these shops are mushrooms. They're springing up all over the place.There are stories I could tell, but not in public. Ask me next time we're in the same city, same time.
Oh yes. Can't wait. I love hearing these stories. Kevin Boles was regaling me recently. It's simply amazing. Although, I see amazingly stupid stuff in the company where I work, where they could walk across the hall and ask me... doesn't happen.
"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
November 23, 2010 at 10:07 am
Grant Fritchey (11/23/2010)
Oh yes. Can't wait. I love hearing these stories. Kevin Boles was regaling me recently. It's simply amazing. Although, I see amazingly stupid stuff in the company where I work, where they could walk across the hall and ask me... doesn't happen.
Remind me at Summit (you are coming?). We can find somewhere with decent food (or good coffee) and I can tell you some horror stories.
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
November 23, 2010 at 10:12 am
Grant Fritchey (11/23/2010)
GilaMonster (11/23/2010)
Grant Fritchey (11/23/2010)
I see how you consultants keep making money though. Seems like these shops are mushrooms. They're springing up all over the place.There are stories I could tell, but not in public. Ask me next time we're in the same city, same time.
Oh yes. Can't wait. I love hearing these stories. Kevin Boles was regaling me recently. It's simply amazing. Although, I see amazingly stupid stuff in the company where I work, where they could walk across the hall and ask me... doesn't happen.
Yep, one definately has job security, and I actually don't consult the way Gail and the rest do to clean up systems, I just travel as a fill-in dba for a paycheck.
Never stop learning, even if it hurts. Ego bruises are practically mandatory as you learn unless you've never risked enough to make a mistake.
For better assistance in answering your questions[/url] | Forum Netiquette
For index/tuning help, follow these directions.[/url] |Tally Tables[/url]
Twitter: @AnyWayDBA
November 23, 2010 at 10:18 am
Topic changer:
I want to bring up the age old question related to books.
If you were to buy a SQL book, what would you buy? If there is a topic you wanted to learn about, what is it? Is there a good book on the topics you want most to learn?
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
November 23, 2010 at 10:32 am
Craig Farrell (11/23/2010)
Yep, one definately has job security, and I actually don't consult the way Gail and the rest do to clean up systems, I just travel as a fill-in dba for a paycheck.
My main focus is performance tuning. Also do projects (BI/reporting often), DBA/DBA training and, like now, per-hour development work. Whatever's going really.
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
November 23, 2010 at 10:34 am
CirquedeSQLeil (11/23/2010)
If you were to buy a SQL book, what would you buy? If there is a topic you wanted to learn about, what is it? Is there a good book on the topics you want most to learn?
http://www.amazon.com/lm/R3RB13PQ7D8TKB
Got about half of them.
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
November 23, 2010 at 10:38 am
GilaMonster (11/23/2010)
Craig Farrell (11/23/2010)
Yep, one definately has job security, and I actually don't consult the way Gail and the rest do to clean up systems, I just travel as a fill-in dba for a paycheck.My main focus is performance tuning. Also do projects (BI/reporting often), DBA/DBA training and, like now, per-hour development work. Whatever's going really.
Heh, kinda sounds familiar, but it seems my main focus ends up being either highspeed troubleshoots across major systems, massive multi-server upgrades, or "Holy crap our project is screwed!!!" "No, it's not" type of project saves. At least for the past few years. It's kind of nice, at the moment I'm just doing simple dev work. Finally can breathe. 😀
Never stop learning, even if it hurts. Ego bruises are practically mandatory as you learn unless you've never risked enough to make a mistake.
For better assistance in answering your questions[/url] | Forum Netiquette
For index/tuning help, follow these directions.[/url] |Tally Tables[/url]
Twitter: @AnyWayDBA
November 23, 2010 at 10:44 am
CirquedeSQLeil (11/23/2010)
Topic changer:I want to bring up the age old question related to books.
If you were to buy a SQL book, what would you buy? If there is a topic you wanted to learn about, what is it? Is there a good book on the topics you want most to learn?
Usually if I buy a book, it's because it's something I want as a right there reference so I don't have to keep swapping screens at work... or because I'm expecting huge amounts of offline time.
As to what I need to learn about, I've been a generalist so long that I'm middlin' to decent in most topics, but need to learn on all of them. It's a case of there's so much I still need to learn I could start roughly anywhere above the 'for dummies' level. 🙂
Never stop learning, even if it hurts. Ego bruises are practically mandatory as you learn unless you've never risked enough to make a mistake.
For better assistance in answering your questions[/url] | Forum Netiquette
For index/tuning help, follow these directions.[/url] |Tally Tables[/url]
Twitter: @AnyWayDBA
November 23, 2010 at 10:44 am
Brandie Tarvin (11/23/2010)
Oddly enough, I know a lot of DBAs & Devs who use SELECT DISTINCT out of nothing more habit. It's not that they need to do it. They just assume it's part of every query.It's a habit I had to break myself out of a few years back.
Maybe I'm old school, but have a good reason and know why you're using it.
What if you needed to see duplicates?
Or had a design issue that really should be addressed?
I usually see it when someone misses a table join.
Of course working in a data warehouse might also explain something.
Greg E
November 23, 2010 at 10:45 am
GilaMonster (11/23/2010)
CirquedeSQLeil (11/23/2010)
If you were to buy a SQL book, what would you buy? If there is a topic you wanted to learn about, what is it? Is there a good book on the topics you want most to learn?http://www.amazon.com/lm/R3RB13PQ7D8TKB
Got about half of them.
Good list. My underlying goal is to see if there is a topic not yet covered by a good book.
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
November 23, 2010 at 10:46 am
Craig Farrell (11/23/2010)
CirquedeSQLeil (11/23/2010)
Topic changer:I want to bring up the age old question related to books.
If you were to buy a SQL book, what would you buy? If there is a topic you wanted to learn about, what is it? Is there a good book on the topics you want most to learn?
Usually if I buy a book, it's because it's something I want as a right there reference so I don't have to keep swapping screens at work... or because I'm expecting huge amounts of offline time.
As to what I need to learn about, I've been a generalist so long that I'm middlin' to decent in most topics, but need to learn on all of them. It's a case of there's so much I still need to learn I could start roughly anywhere above the 'for dummies' level. 🙂
That's a good place to start.
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
Viewing 15 posts - 21,766 through 21,780 (of 66,712 total)
You must be logged in to reply to this topic. Login to reply