Please start any new threads on our new
site at https://forums.sqlteam.com. We've got lots of great SQL Server
experts to answer whatever question you can come up with.
Author |
Topic |
mlike
Starting Member
3 Posts |
Posted - 2013-07-21 : 12:47:24
|
Hello - After we deploy to prod, we notice that sometimes stored procedures are running slow. After we run sp_recompile, then the run normal. We are thinking about proactively running sp_recomile on on all tables that will be modified during a deployment. Are their potential negative consequences to this? If 50 stored procs reference a table, then all 50 of those procs will then be marked for recompile, and will be recompiled on next execution, correct? Also, if the parms going into any of those procs start to vary outside of their normal bounds, will this have a negative impact on performance? Thank you in advance!mlike |
|
SwePeso
Patron Saint of Lost Yaks
30421 Posts |
Posted - 2013-07-21 : 13:24:31
|
sp_recompile does not "recompile" tables. It flushes the current execution plan(s) and stores a new one.However, DBCC UPDATESTATS will update statistics on a table or index and recompile all procedures referencing to this table or index. Microsoft SQL Server MVP, MCT, MCSE, MCSA, MCP, MCITP, MCTS, MCDBA |
|
|
visakh16
Very Important crosS Applying yaK Herder
52326 Posts |
|
|
|
|
|
|