Home Forums SQL Server 2008 T-SQL (SS2K8) ORDER BY = Bubble Sort ? Quick Sort ? Insertion Sort ? RE: ORDER BY = Bubble Sort ? Quick Sort ? Insertion Sort ?

  • Grant Fritchey (3/7/2013)


    The query engine will do what it does. That's in the internals. No way to know without a debugger or insider knowledge. It will use tempdb though.

    Unless the data's small enough it can manage entirely within the memory grant. Not much chance of that except with trivial data.

    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