SqlShare.com Logo
 
Skip Navigation Links
Home
Video List
Events
Classes
About Us
Login / Register
Subscribe RSS Feed 

Takes Query Plan Analysis and Performance Monitoring to a New Level

Using WITH RECOMPILE With a Stored Procedure - Part 1

WITH RECOMPILE is a way to tell SQL to build a plan, execute it, and then throw it away. Why do that? Usually it's because the underlying data is distributed in a way that a one sized fits all plan just doesn't really fit all. WITH RECOMPILE applies to all the statements in the procedure, so if you only have one statement, it's not bad, but if you have multiple statements, check out OPTION RECOMPILE which does the same thing at the statement level.

Duration:
1 mins 56 secs
Skill Level:
100
Rating:
4.29 out of 5
Publish Date:
August 17, 2010
Using WITH RECOMPILE With a Stored Procedure - Part 1 You must be logged in to view this video.  
Bookmark and Share
 
1=Poor, 3=Good, 5=Excellent

About the Author

Image of Andy Warren
Andy Warren is a software trainer focusing on SQL Server, a member of the PASS Board of Directors, and a principal in this site - SQLShare.com.

References



Comments
A Alagu Ganesh on 8/18/2010
good

Marc Moshman on 8/18/2010
Interesting, not just for the 'with recompile' information, but the info on managing/mining the procedure cache

Kasey Wheeler on 8/18/2010
Good video, nice and short. Keep em comin'!!!

Very nice

D151BB6B9F on 8/18/2010
You fly by what you're doing so fast, I don't have time to see what you're executing. What's the rush? Give us a few seconds to see what you're doing.

Jack Pines on 8/18/2010
Thanks, Andy, for your continued, great presentations.

E72B0A9423 on 8/18/2010
good info

Leonard Peoples on 8/18/2010
I'm not sure why I would need to do this yet, but I'll keep watching. It looks interesting.

Santosh Singh on 8/30/2010
didnt know that you could specify with recompile while creating the stored procedures



Must Be Logged In
 

How Do I Become a Video Author? |  Newsletter History

Copyright © Fourdeuce, Inc., 2005-2009. All Rights Reserved | Privacy Policy | Terms & Conditions