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)


    GilaMonster (3/7/2013)


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

    Not arguing, just clarifying, won't it allocate some space on tempdb anyway?

    Sorts I don't think so, not unless it actually spills. Until it spills, it's within the query execution's memory memory space.

    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