• TomThomson (5/5/2014)


    Or did you mean "It depends what the optimizer thinks is best"?

    That would be the the one because I've also seen it where the optimizer reused a plan with hashes that it probably shouldn't have.

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