Hi All, Thanks for reading this post, please can anyone help me in a stored procedure which is 1800 lines worth of code, being taking 40 seconds to return few rows. There are around 200 variables, cursor, a table being referred over and over, which I think with 400000 rows, I believe that the table is filtered with a where clause @variable. I could post the code, at your request. PS : I do not know the domain knowledge nor the purpose of it. Thanks, AB.