• MarbryHardin (4/24/2014)


    The bulk of the execution plan cost comes out to a clustered index scan on the primary table. It's more than sufficient for our needs.

    If I get the chance it would be nice to play with optimizing it against a large number of records.

    To be honest, those are famous last words. 🙂 No one ever goes back to plan for the inevitable scalability problems and, when such problems occur, it creates a drop-everything panic.

    My recommendation would be that what is "sufficient" for your "needs" really isn't. Do it the right way now. It's not "pre-optimization"... it's just writing good code.

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