• kevaburg - Saturday, October 21, 2017 12:56 AM

    Another reason I want to avoid hints is this:  I attended a lecture from a MCM here in Germany and he made this statement:
    "If you feel the only way to solve a problem is to use a hint you are making a conscious ascertation that you understand the optimiser better than the 200-300 professional developers in Redmond that developed it".

    Heh... You mean the same folks that developed the crippled PIVOT even though MS has a great model of a non-crippled version in ACCESS... the ones that crippled performance with FORMAT... the ones that made recursive CTEs run slower and more resource intensive than a While Loop... the ones that created a splitter function with no guarantee of sort order and no return of element position... the ones that cause online rebuilds to sometimes corrupt the clustered index in 2012... the ones that refuse to have a built in Tally Table function because they don't understand how it would be used... the ones that keep deprecating functionality and frequently replacing it with something that doesn't work as well... the ones that caused SSIS installations to go corrupt after an SP release... the ones that still haven't figured out how to do a Peter Norton style shrink of a database even though the technology has existed for more than 3 decades... the ones that still haven't created an easy to use true CSV file importer for T-SQL.. the ones that have to issue CUs faster than most people balance their checkbook to fix stuff on a product that's been around for 30 years... or the ones that blew some major portions of the code at work out of the water with their new cardinality estimator?

    I have a huge appreciation for the problems associated with complexities of the code behind SQL Server but the folks in Redmond aren't gods (and that's not a slam against them but could be in the future if they keep going the way they're going 😉 ).  You don't actually have to know or understand the optimizer as they claim to know when it's done something wrong and needs some help and that's a part of the reason why they did include index hints.

    To wit, I take strong exception to the statement you quoted because sometimes the answer is "The people in Redmond don't have to solve this particular problem... I DO"!!

    --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.

    Change is inevitable... Change for the better is not.


    Helpful Links:
    How to post code problems
    How to Post Performance Problems
    Create a Tally Function (fnTally)