Wish you all a very Happy and Prosperous New Year 2007
we are using Stored Procedures in our application. In some cases, the Select Query takes more that 10 Min. But our client application will throw timed out execption after 2 min. But the SQL will be running at the database.
Is there any way to kill or Stop the SQL query execution or Is there any way to time out the Stored Procedure.
Our table contains 3 Millions records and we are using Top N queries for Pagination and also using order by in non indexed field. since our requirement was like that, and also we were not supposed to create any functional index on the database.
Hence while timed out, we are trying to avoid filling of temp space and terminate the SQL query.
If your queriy is running for that long its likely to be hammering the database (especially as users like to rerun queries when they dont come back quickly). You should get onto the DBAs and point out that the cost of function based indexes (and or doing other tuning like partitioning etc) is likely to be far outweighed by the advantages