Click here to monitor SSC
SQLServerCentral is supported by Red Gate Software Ltd.
 
Log in  ::  Register  ::  Not logged in
 
 
 
        
Home       Members    Calendar    Who's On


Add to briefcase 12345»»»

How to Increase Query Speed by 3 Orders of Magnitude with no Indexes Expand / Collapse
Author
Message
Posted Tuesday, July 13, 2010 9:29 PM
SSC-Enthusiastic

SSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-Enthusiastic

Group: General Forum Members
Last Login: Tuesday, July 29, 2014 2:47 PM
Points: 132, Visits: 114
Comments posted to this topic are about the item How to Increase Query Speed by 3 Orders of Magnitude with no Indexes
Post #951976
Posted Tuesday, July 13, 2010 10:08 PM
SSC Rookie

SSC RookieSSC RookieSSC RookieSSC RookieSSC RookieSSC RookieSSC RookieSSC Rookie

Group: General Forum Members
Last Login: Monday, July 16, 2012 10:19 AM
Points: 46, Visits: 177
Yes. Your boss did the right thing and it was brilliant. But couldn't the three hour query have been the result of an inadequate use-case?
Post #951986
Posted Tuesday, July 13, 2010 10:10 PM


SSC-Dedicated

SSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-Dedicated

Group: General Forum Members
Last Login: Yesterday @ 1:53 PM
Points: 35,366, Visits: 31,905
A short, sweet, and brilliant article! Bravo Stephen and spot on on all points especially on working with your "customers".

There's only one problem with the scenario you're given... what if the "customers" had said the data had to be "up to date" as in "to the second" (or so)? That probably brings us to the real problem of not having enough time because of poorly estimated schedules or the corner office wants it real bad and, obviously, got it that way or no one really gave a damn when it came to design and coding. It's one of the reasons why I say to always plan and program as if there were at least million rows in each and every table.

I don't know about others but I gave this article 5 stars for the message it carries about working with the customer. By the same token, I could have given this article MINUS 5 stars because (not having ANYTHING to do with the author) the boss actually isn't a hero because he is the one that should have managed things in such a fashion to PREVENT such problems from happening to begin with.

Tell your boss I said "Welcome to the Lucky Rollers Club" and to start taking care of business because the answer could have been a whole lot different.


--Jeff Moden
"RBAR is pronounced "ree-bar" and is a "Modenism" for "Row-By-Agonizing-Row".

First step towards the paradigm shift of writing Set Based code:
Stop thinking about what you want to do to a row... think, instead, of what you want to do to a column."

(play on words) "Just because you CAN do something in T-SQL, doesn't mean you SHOULDN'T." --22 Aug 2013

Helpful Links:
How to post code problems
How to post performance problems
Post #951989
Posted Tuesday, July 13, 2010 10:46 PM
Forum Newbie

Forum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum Newbie

Group: General Forum Members
Last Login: Monday, July 26, 2010 11:02 PM
Points: 4, Visits: 26
That's the most misleading title I've seen in a long time...

I was personally interested in the story because I was confronted with a nearly identical situation (Laboratory System with screen taking up to 20 minutes to load). Now in my story, I did improve the query speed by 3 orders of magnitude, not just swipe the problem under the carpet...

How is this article going to help anyone actually trying to troubleshoot performance issues?

Post #952001
Posted Tuesday, July 13, 2010 11:16 PM
SSC Rookie

SSC RookieSSC RookieSSC RookieSSC RookieSSC RookieSSC RookieSSC RookieSSC Rookie

Group: General Forum Members
Last Login: Friday, October 10, 2014 9:09 AM
Points: 30, Visits: 13
While it is a cute story, the real meat is in the advice at the end.
1. Get to know your end users as people
2. Learn their jobs and their concerns
3. Don't undertake a design/analysis/programming project if you do not have free access to the end users and stake holders.
4. End users will know significantly more about how they do their jobs and what works than they are given credit for.
5. When an end user has a problem with the solution, always assume there is a problem until your have proof there is not. It is not the end users job to debug your code. Most shops assume there is no problem unless the user can prove it. This approach is fundamentally flawed.

Using these guide lines, projects will run more smoothly and have a much better chance of finishing on target and on time.
Post #952018
Posted Tuesday, July 13, 2010 11:24 PM
SSC Rookie

SSC RookieSSC RookieSSC RookieSSC RookieSSC RookieSSC RookieSSC RookieSSC Rookie

Group: General Forum Members
Last Login: Monday, February 3, 2014 12:36 AM
Points: 43, Visits: 133
Solved in terms of perception only.

Your boss fixed the problem of an overly odourous recycling plant by moving it someplace (or perhaps more correctly, sometime) else. The users aren't around to smell it anymore, but the garbage tip still stinks!

I'd like to know what, if anything, was done to fix the underlying design/resource issues that produced the problem in the first place.
Post #952025
Posted Tuesday, July 13, 2010 11:39 PM


SSCoach

SSCoachSSCoachSSCoachSSCoachSSCoachSSCoachSSCoachSSCoachSSCoachSSCoachSSCoach

Group: General Forum Members
Last Login: Today @ 9:59 AM
Points: 17,822, Visits: 15,747
Nice article. I think this is sometimes overlooked as a valid method to troubleshoot performance problems. The point is to provide a solution that meets the requirements without killing the system.

Thanks very much for sharing.




Jason AKA CirqueDeSQLeil
I have given a name to my pain...
MCM SQL Server, MVP


SQL RNNR

Posting Performance Based Questions - Gail Shaw
Post #952034
Posted Tuesday, July 13, 2010 11:49 PM
SSC Rookie

SSC RookieSSC RookieSSC RookieSSC RookieSSC RookieSSC RookieSSC RookieSSC Rookie

Group: General Forum Members
Last Login: Thursday, October 9, 2014 10:38 AM
Points: 34, Visits: 98
I'm definitely on the side of calling this an elegant solution. When you can define the frame, you can always win. It's not always this easy to do so, but when possible, ka-ching!



Post #952041
Posted Wednesday, July 14, 2010 12:40 AM
Forum Newbie

Forum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum Newbie

Group: General Forum Members
Last Login: 2 days ago @ 8:00 AM
Points: 3, Visits: 122
steve.vidal (7/13/2010)
That's the most misleading title I've seen in a long time...

I was personally interested in the story because I was confronted with a nearly identical situation (Laboratory System with screen taking up to 20 minutes to load). Now in my story, I did improve the query speed by 3 orders of magnitude, not just swipe the problem under the carpet...

How is this article going to help anyone actually trying to troubleshoot performance issues?



Absolutely agreed! What the article describes is plain common sense; it's doesn't "increase query speed" at all, simply moves the load to a time when systems are under or less utilised. Been doing that for years.
Post #952072
Posted Wednesday, July 14, 2010 12:47 AM


Ten Centuries

Ten CenturiesTen CenturiesTen CenturiesTen CenturiesTen CenturiesTen CenturiesTen CenturiesTen Centuries

Group: General Forum Members
Last Login: Tuesday, September 30, 2014 7:41 AM
Points: 1,255, Visits: 771
As of midnight would be perfectly fine

Good stories usually have a happy ending. Not exactly an eye-opener, but nevertheless a good reminder.

We had it the other way round. Every night a job ran to populate a datawarehouse. The customer asked if it were possible to update the datawarehouse 4 times a day. It was - in this case - possible without any problems. Usually the business rules change for the worse.




Dutch Anti-RBAR League
Post #952079
« Prev Topic | Next Topic »

Add to briefcase 12345»»»

Permissions Expand / Collapse