• opc.three (3/1/2013)


    Jeff Moden (3/1/2013)


    Actually, the change of an index CAN very much change the result especially where UPDATEs are concerned.

    I think we covered the OP's question about SELECT statements so I don't feel bad taking a sidebar here.

    Is this something to do with the quirky update? Can you provide some documentation that explains the behavior you're alluding too?

    It certainly applies to the quirky update but I wasn't referring to such an arcane method. Gail is spot on for what I meant.

    They can also affect SELECTs that use TOP with no ORDER BY. The addition of a index can instantly change what the TOP returns if the index comes into play. In most cases, of course, it is NOT something that should be relied on.

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