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 ?

  • Matt Miller (#4) (3/8/2013)


    Besides - all of those sorts methods you mentioned presume a flat list structure. The internals for how tables are structured are anything but flat.

    In short - I suspect the actual answer is "none of the above".

    I'd tend to agree with Matt on this - my suspicion is that it will use a heavily optimised hash table in most circumstances but the only people that can give you a definitive answer would be Microsoft.

    You could try asking on MSDN.