We help IT Professionals succeed at work.

stored procedures execution plan

Medium Priority
353 Views
Last Modified: 2012-03-14
How can I find out if my stored procedures execution plan is being recompiled each time it runs.

When I run the same query when it is not encapsulated inside a procedure it is much faster.
Comment
Watch Question

If your parameter values in your sp vary a lot, SQL doesn’t benefit from the cached execution plan.

You could use WITH RECOMPILE to force recompilation each time the sp is run, or if the sp is large, try and split it up into multiple smaller sp’s.

A bit about recompiling sp's:
http://msdn.microsoft.com/en-us/library/ms190439.aspx

Author

Commented:
I don'y want to recompile... i want to see if the sql engine is recompliling the sproc automatically.

Author

Commented:
thanks

Explore More ContentExplore courses, solutions, and other research materials related to this topic.