• The problem with all this automatic stuff is that it may never actually do anything to help you identify the actual root of the problem and even the alleged better plan is a train-wreck to begin with.  For example, if you aren't updating statistics on large volumes of data changes, either the new or old plans could be absolutely horrible.  And there may be no good plan to be had because the ORM created a non-sargable bit of code that must recompile every time it's used (like we had) and it takes 2 to 22 seconds with an average of 7 seconds to compile each time.

    Yes, I agree that such automatic selection can help with occasional bad parameter sniffing but make sure this magical cure isn't giving you the nice-warm-fuzzies about things that you really should be proactively looking for and fixing instead.

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