What are you doing in the stored procedure?
If, for example, you are dynamically building statements, a recompile may
access newer (better?) statistics and end up improving the compilation.
Another area that could end up with improvements is when you are chaging the
underlying objects (some object changes require SQL procedure recompiles for
hte sproc to even work, of course). If you are dinking with objects in
Enterprise Manager, that could be why.
I might not have answered your particular question, but it is awfully
generic. If you want to provide more specifics, you will get a better answer.
Also, consider posting in the SQL Server programming group, as you are more
likely to get a SQL Server answer there.
--
Gregory A. Beamer
MVP; MCP: +I, SE, SD, DBA
***************************
Think Outside the Box!
***************************
"Britney" wrote:
hi all,
Sometimes I noticed that when I use WITH RECOMPILE inside stored
procedure, the performance is better (more consistent), why?