• dwain.c (7/8/2013)


    In that case, without an ORDER BY shouldn't the rows be returned in the order established by the clustered INDEX?

    No. Without an order by there is no guarantee of the order that the rows will be returned in. Now, for a simple select * without parallelism, the data will probably come back in the order of the index used for the query, because that's the order the QP left it in after the last query operator. However don't confuse probable behaviour with guaranteed behaviour, without an order by there is no guaranteed order.

    Gail Shaw
    Microsoft Certified Master: SQL Server, MVP, M.Sc (Comp Sci)
    SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability

    We walk in the dark places no others will enter
    We stand on the bridge and no one may pass