SQL Server Performance

A stored Procedure very slowly but......

Discussion in 'General DBA Questions' started by Jelly0228, May 7, 2004.

  1. Jelly0228 New Member

    Hi,
    this morning i got an odd question©s
    I ran a stored procedure ,but it was very slowly,but when i copied out the code of this stored procedure into the query analyzer to run,it's very quickly.and the other stored procedures has the same question.how do i to do ?

    Jelly.
  2. gaurav_bindlish New Member

    Did you try recompiling the same?

    Gaurav
    Moderator
    Man thrives, oddly enough, only in the presence of a challenging environment- L. Ron Hubbard

    The views expressed here are those of the author and no one else. There are no warranties as to the reliability or accuracy of anything presented here.
  3. Luis Martin Moderator

    Also did you run update statistics and/or rebuild indexs as part of manteinance plan?


    Luis Martin
    Moderator
    SQL-Server-Performance.com

  4. gaurav_bindlish New Member

    I think if the statistics were not updated, the query would have run slowly in the Query analyzer as well. Isn't this the case?

    Gaurav
    Moderator
    Man thrives, oddly enough, only in the presence of a challenging environment- L. Ron Hubbard

    The views expressed here are those of the author and no one else. There are no warranties as to the reliability or accuracy of anything presented here.
  5. Luis Martin Moderator

    Shure, Gaurav, just was an aditional question. Some times when I ask about this, the answer is: what is that? or, why? I should do that?


    Luis Martin
    Moderator
    SQL-Server-Performance.com

  6. satya Moderator

    If you recompile the SP it will run with good performance, on the part of the update stats it will take care of involved indexes to cope up the performance.

    Satya SKJ
    Moderator
    http://www.SQL-Server-Performance.Com/forum
    This posting is provided “AS IS” with no rights for the sake of knowledge sharing.
  7. Jelly0228 New Member

    thanks all friends.

    Jelly.

Share This Page