SQL Server Performance

Stored procedure taking 40 secs, mixture of a cursor 200 variables and so on

Discussion in 'ALL SQL SERVER QUESTIONS' started by Antonio Benildus Muerling, Jul 1, 2012.

  1. 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.


  2. Madhivanan Moderator

    What are you doing with a cursor?
  3. looping through some records, is the best I can say, loop through it take values and into another intermediary temp table.
  4. Shehap MVP, MCTS, MCITP SQL Server

    Might you pass the T-SQL Query to be able to point out the required T-SQL enhancements and Index Optimizations in order to speed it up..?
  5. I cant post the code, as it says the lines of code more than 10000 characters.
  6. Guys please see the file attached and let me know, how could I streamline the codes of it.

    Attached Files:

  7. Did anyone see the file attached...

Share This Page