9

SQL Server : Improve SIMPLE SELECT to retun 2 LAC Rows faster?

view full story
linux-howto

http://serverfault.com – We have a Store Procedure and in this SP we are creating a TEMPORARY Table which has more than 200000 rows with 30 columns (2 of datetime, 4 of INT, 5 of [numeric](20, 3) and rest of VARCHAR(500) data types. This SP is giving the SIMPLE SELECT of this TEMPORARY Table in final output. Now the problem is the final SELECT statement is taking more than 3 Minutes to list all records. We tried by adding an Identity column to this Temp. Table and added Non-Clustered Index on this Identity column and in final output we don't include this column in SELECT statement but, in ORDER BY clause only. But, (HowTos)