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,
M.Karthik
i-flex solutions ltd.
Ph: 22086000,57596000 Extn: 6982
[email protected]
http://www.sql-server-performance.com/performance_introduction.asp
http://www.sql-server-performance.com/vk_sql_best_practices.asp
for your reference. Satya SKJ
Moderator
http://www.SQL-Server-Performance.Com/forum
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
Moderator
SQL-Server-Performance.com All postings are provided “AS IS” with no warranties for accuracy.
Create an index on the column you order by.
]]>