SQL query takes a long time | SQL Server Performance Forums

SQL Server Performance Forum – Threads Archive

SQL query takes a long time

My SQL query retrieves some thousands of records and sorts them using ORDER BY clause. But it takes a very long time (> 5 minutes). Removing the ORDER BY clause reduces the time to 3 seconds. Could you please suggest a method of getting a sorted output for the query with smaller access time. Regards,
i-flex solutions ltd.
Ph: 22086000,57596000 Extn: 6982
[email protected]
for your reference. Satya SKJ
This posting is provided “AS IS” with no rights for the sake of knowledge sharing.
See execution plan to find out whar indexes are using and ITW to find new ones.
Luis Martin
SQL-Server-Performance.com All postings are provided “AS IS” with no warranties for accuracy.
Create an index on the column you order by.