• This is very nearly a duplicate post...

    http://www.sqlservercentral.com/Forums/Topic410280-65-1.aspx

    The only thing that means anything about performance for all the timers you have here is this...

    Number of TDS packets received 28569 28569

    Number of bytes sent 2054 2054

    Number of bytes received 1.16501e+008 1.16501e+008

    It means you asked for a lot of data... and got it... The number of bytes returned are in excess of 100 million bytes and you did it all with two selects. That's a lot of information to stream over a pipe...

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