with recompilation

B

Britney

hi all,
Sometimes I noticed that when I use WITH RECOMPILE inside stored
procedure, the performance is better (more consistent), why?
 
G

Guest

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!
***************************
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
474,430
Messages
2,571,676
Members
48,796
Latest member
Greg L.

Latest Threads

Top