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 |
|
AskSQLTeam
Ask SQLTeam Question
0 Posts |
Posted - 2002-02-08 : 09:50:08
|
| Scott writes "I have a stored procedure that appears to need a sp_recompile whenever the server is rebooted. Other SP's do not require this; yet the one under scrutiny has a series of UNION statements. Is this an UPDATE STATISTICS / Optimizer issue? I'm wondering if the query plan is caching part of this SP, and gets lost durring the restart.Any assistance welcomed.-Scott" |
|
|
efelito
Constraint Violating Yak Guru
478 Posts |
Posted - 2002-02-08 : 10:19:45
|
| What makes you think it needs a recompile? Does it error out if you do not recompile it after a reboot? Or does it just perform poorly?Jeff BanschbachConsultant, MCDBA |
 |
|
|
slmargolis
Starting Member
1 Post |
Posted - 2002-02-12 : 12:27:14
|
| It appears that the stored procedure will execute extremely slow until the sp_recompile command is used. I've considered just creating a TSql job to run once a week to execture the command; yet really curious why this sp has a problem. The sp does have a lot of complex JOINS and a UNION which could be lost when the execution plan is lost durring a re-boot. Not sure. |
 |
|
|
|
|
|