Results 1 to 3 of 3
  1. #1
    Join Date
    Jul 2013

    Unanswered: Performance issue with the Stored procedure

    Hi All,

    Currently i have modified the stored procedure to handle the some additional functionality. I deployed the modified procedure and ran it was completed successfully in 1 hour. I ran the same procedure without changing anything( both the code and data) and the proceudre took 5 hours to complete.
    once again I dropped the procedure and re-deployed and ran the proceudre and it completed in 1 hour. So whenever i ran the procedure after the 1 ran of deploymnet i am facing the performance problem. could you please help me on this asap?????

    In our stored procedure we are using more temp tables and indexes on temp tables.
    I also check the transcation log and temp db utilisation during the both the ran(when it took 1 hr to complete and 5 hour to complete). In both the case the tempdb utilisation was less than the 5%.

    From the query plan i have seen that the query taking more time during the second run. Buffer Replacement Strategy for data pages is LRU for temp table during the first and it was MRU during second time.

    Please let me know your thoughts on this ASAP.

    waiting for your replies....

    Thanks in Advance.


  2. #2
    Join Date
    May 2009
    Hi Rashiv

    Maybe you want to give us more details of your stored procedure.

    Things to watch out are:
    - Usage of your cursor
    - proper indexation
    - number of temp tables
    - number of times you commit to the db

    Best is to post a sample of your SP here...

    Best of luck

  3. #3
    Join Date
    Jul 2013
    Hi DBuff,

    I have created SP with recompile option and its working fine now.


Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts