Re: sp_recompile
From: Jacco Schalkwijk (jacco.please.reply_at_to.newsgroups.mvps.org.invalid)
Date: 09/29/04
- Next message: Allen Davidson: "Re: Resetting DTS password"
- Previous message: x-rays: "Unicode chars"
- In reply to: JOE: "sp_recompile"
- Next in thread: JOE: "Re: sp_recompile"
- Reply: JOE: "Re: sp_recompile"
- Messages sorted by: [ date ] [ thread ]
Date: Wed, 29 Sep 2004 14:36:14 +0100
You don't really need sp_recompile unless you add indexes. Stored procedures
that access tables are automatically marked for recompilation when the
schema changes or the statistics on columns or indexes that are used in the
execution plan of the stored procedure.
The downside of running sp_recompile on a regular basis is that it only
marks the objects for recompilation, and only when the stored procedures are
actually run will a new execution plan be compiled. If you have a stored
procedure with an execution plan that costs a lot of time to compile, the
first user who calls that stored procedure after recompilation will notice a
delay.
-- Jacco Schalkwijk SQL Server MVP "JOE" <removejaylou@aol.com> wrote in message news:380401c4a623$c2a42520$a501280a@phx.gbl... > Hi all, > Is there any downside to running sp_recompile on all > objects in my data base once a week? Should I run this > against system objects as well? > > TIA, > Joe
- Next message: Allen Davidson: "Re: Resetting DTS password"
- Previous message: x-rays: "Unicode chars"
- In reply to: JOE: "sp_recompile"
- Next in thread: JOE: "Re: sp_recompile"
- Reply: JOE: "Re: sp_recompile"
- Messages sorted by: [ date ] [ thread ]
Relevant Pages
|