A stored Procedure very slowly but…… | SQL Server Performance Forums

SQL Server Performance Forum – Threads Archive

A stored Procedure very slowly but……

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.
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.
Also did you run update statistics and/or rebuild indexs as part of manteinance plan?
Luis Martin
Moderator
SQL-Server-Performance.com
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.
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
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.
thanks all friends. Jelly.
]]>

Software Reviews | Book Reviews | FAQs | Tips | Articles | Performance Tuning | Audit | BI | Clustering | Developer | Reporting | DBA | ASP.NET Ado | Views tips | | Developer FAQs | Replication Tips | OS Tips | Misc Tips | Index Tuning Tips | Hints Tips | High Availability Tips | Hardware Tips | ETL Tips | Components Tips | Configuration Tips | App Dev Tips | OLAP Tips | Admin Tips | Software Reviews | Error | Clustering FAQs | Performance Tuning FAQs | DBA FAQs |