order by | SQL Server Performance Forums

SQL Server Performance Forum – Threads Archive

order by

ORder by fasten qury or delay result set thanx in advance SQL is love
An ORDER BY clause is not intended to be used to increase or decrease query performance. It is the only reliable way to force SQL Server to return an ordered result set.
However you can check the difference by placing SET STATISTICS TIME ON as first statement in your query and run the query without using ORDER BY through QA. Watch the results. You then can use DBCC DROPCLEANBUFFERS and rerun the query using ORDER BY. Now you can compare. Frank
Order by can’t make a query fast. Depending upon the result set and depending on the indexes on the columns, it may make the query slow. Enable the execution plan while running the query and check the cost on ‘Sort’.