Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

stored procedures execution plan

Posted on 2012-03-14
4
Medium Priority
?
310 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.
0
Comment
Question by:Mr_Shaw
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
4 Comments
 
LVL 3

Assisted Solution

by:GiantSlayer
GiantSlayer earned 200 total points
ID: 37719586
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
0
 

Author Comment

by:Mr_Shaw
ID: 37719736
I don'y want to recompile... i want to see if the sql engine is recompliling the sproc automatically.
0
 
LVL 25

Accepted Solution

by:
jogos earned 1800 total points
ID: 37720065
0
 

Author Closing Comment

by:Mr_Shaw
ID: 37720973
thanks
0

Featured Post

Simplifying Server Workload Migrations

This use case outlines the migration challenges that organizations face and how the Acronis AnyData Engine supports physical-to-physical (P2P), physical-to-virtual (P2V), virtual to physical (V2P), and cross-virtual (V2V) migration scenarios to address these challenges.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Hi all, It is important and often overlooked to understand “Database properties”. Often we see questions about "log files" or "where is the database" and one of the easiest ways to get general information about your database is to use “Database p…
SQL Server engine let you use a Windows account or a SQL Server account to connect to a SQL Server instance. This can be configured immediatly during the SQL Server installation or after in the Server Authentication section in the Server properties …
Video by: ITPro.TV
In this episode Don builds upon the troubleshooting techniques by demonstrating how to properly monitor a vSphere deployment to detect problems before they occur. He begins the show using tools found within the vSphere suite as ends the show demonst…
In this brief tutorial Pawel from AdRem Software explains how you can quickly find out which services are running on your network, or what are the IP addresses of servers responsible for each service. Software used is freeware NetCrunch Tools (https…

722 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question