May 21, 2011 at 12:03 pm
Comments posted to this topic are about the item Hints Are Not Always Better
May 21, 2011 at 12:53 pm
This post makes me want to see Rob's pre-conference session this October at the PASS Summit. Hopefully he will get picked and many of us will get the chance to learn more nuggets like this one.
Agreed. (Which implies that I find a way to go there myself - either by getting selected to present myself, or work paying for it).
Wayne
Microsoft Certified Master: SQL Server 2008
Author - SQL Server T-SQL Recipes
May 21, 2011 at 10:53 pm
Thanks for your kind words, Steve. It'd be nice to get a precon spot, but I know I'm up against some excellent competition.
Rob Farley
LobsterPot Solutions & Adelaide SQL Server User Group
Company: http://www.lobsterpot.com.au
Blog: http://blogs.lobsterpot.com.au
May 22, 2011 at 11:24 am
Very well done Rob and Steve! Rob, I hope you do get a precon!
I wish more people would understand what "tuning" is all about. It's not about getting SQL Server to do what you want... Rather, it's about LETTING SQL Server do what you want. π
--Jeff Moden
Change is inevitable... Change for the better is not.
May 23, 2011 at 8:24 am
Jeff Moden (5/22/2011)
I wish more people would understand what "tuning" is all about. It's not about getting SQL Server to do what you want... Rather, it's about LETTING SQL Server do what you want. π
I respectfully disagree; I would say "tuning" is about achieving as close to an optimal total compromise as possible. "Total" refers to requirements gathering costs, design time costs, run time costs, maintenance costs. "Costs" refers to raw dollars, the effort and time of humans, various forms of computer effort (CPU, IO per device, etc.), wait times, and so on. I want maximum performance with minimal effort now and in the future; but how much I'll trade higher CPU for higher Reads (and vice versa) depends on the precise system in question.
I do use query hints; but I add comments documenting the differences Profiler recorded in the execution costs, so that in the future they can be revisited if they become problematic or are simply being evaluated.
I do agree with an end statement in the article 'The better question is βIs this index good for this query?β', noting that it's situational.
As far as the general "well, in the future/on another system the hint may become detrimental"; this is why you should use them carefully, sparingly, and after updating statistics, etc. on full size production data for your test runs.
May 23, 2011 at 9:12 am
Nadrek (5/23/2011)
Jeff Moden (5/22/2011)
I wish more people would understand what "tuning" is all about. It's not about getting SQL Server to do what you want... Rather, it's about LETTING SQL Server do what you want. πI respectfully disagree; I would say "tuning" is about achieving as close to an optimal total compromise as possible.
I believe I just said that.
--Jeff Moden
Change is inevitable... Change for the better is not.
May 23, 2011 at 9:20 am
Whenever I feel like adding and hint I ask myself something similar to this :
Am I really smarter than the best MS engineers who had years and trillions of tests to measure this engine and come up with a "best solution" desicion.
Whenever the answer is yes I use the hint... which has never happenned so far!
May 23, 2011 at 12:25 pm
Ninja's_RGR'us (5/23/2011)
Whenever I feel like adding and hint I ask myself something similar to this :Am I really smarter than the best MS engineers who had years and trillions of tests to measure this engine and come up with a "best solution" desicion.
Whenever the answer is yes I use the hint... which has never happenned so far!
That's because you're asking the wrong question. A better question is: Is this particular use case so far different from the wide range which Microsoft's experts have seen, or so rarely used, that they have not optimized for it?
The answer to that question has a slightly higher probability of being "yes".
Going back to the editorial, it's about the situation, not the absolutes. There is no Best Practice. It's Best Practices, because of the different possible situations. On the bright side, that's why we get paid.
May 26, 2011 at 7:53 pm
Well, I got the pre-con! I'm surprised, so if you had any influence in that, Steve, I thank you. Now I just have to make sure I don't disappoint the punters.
Rob Farley
LobsterPot Solutions & Adelaide SQL Server User Group
Company: http://www.lobsterpot.com.au
Blog: http://blogs.lobsterpot.com.au
May 26, 2011 at 8:16 pm
Congrats!
Viewing 10 posts - 1 through 9 (of 9 total)
You must be logged in to reply to this topic. Login to reply