• Steve Jones - SSC Editor (5/5/2014)


    Jeff Moden (5/3/2014)


    I think a much better question would be, "What determines what will be the first (top) table (according to books online) in a hash match join"? 😉

    There's no reliable way to determine this. It should be the smaller input most of the time, but sometimes the optimizer doesn't get that one and that usually means the DBA's phone rings with a complaint.

    Yep... that's my whole point. It would be wonderful to see a QOTD where the correct answer is, "It Depends". 😛

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