SQL Server stored procedure performance issues
We have function they call lot of stored procedures on our project.
Sometimes some stored procedures work very slowly when we alter stored procedure, p开发者_运维问答roblems fixed but after 10 days problems occurs again. We use reindexing, optimizing query etc...
But we did not find any stable solution.
Does anyone have idea about this type of problem
thanks...
If the stored procedures randomly run slowly and running an alter
on them sorts it out then this sounds like a parameter sniffing issue.
Running an ALTER
will cause the cached plan to be dropped for that procedure and it will be recompiled on the next execution. A good article on the area is here
You may need to update your statistics.
EXEC sp_updatestats
精彩评论