|
|
|
|
|
|
|
|
|
Using OPTION RECOMPILE for Statement Level Recompilation
If you grew up with SQL Server you're probably familiar with WITH RECOMPILE, a flag we could add to a stored procedure that would force the entire procedure to recompile. It worked, but on a big stored procedure was expensive. OPTION RECOMPILE gives us the option to just fix the one statement that is causing the pain. It's not the only way to fix the problem, but its simple and reasonably elegant.
|
|
|
|
Duration:
|
3
mins
28
secs
|
|
Skill Level:
|
100
|
|
Rating:
|
4.46
out of 5
|
|
Publish Date:
|
July 27, 2010
|
|
|
|
About the Author
|
|
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
|
|
I am beginner at SQL and I don't understand what situations I would use this in. Would like to have that gap filled although in general I appreciate these lessons as a means of figuring out what I need to investigate.
|
|
|
its good
|
|
|
useful information
|
|
|
Cool information!
|
|
|
You are one of the better presenters I've seen here. Nicely moderated.
|
|
|
Excellent examples. A picture is worth a thousand words...
|
|
|
good job
|
Must Be Logged In
|
|
|
|
|