I've looked all over for this command....what's the command to reset the SQL Server's execution plan?
31
votes
5 Answers
53
votes
For clarity..........
Executing sp_recompile will "mark" the given stored procedure for recompilation, which will occur the next time it is executed.
Using the WITH RECOMPILE option will result in a new execution plan being generated each time the given stored procedure is executed.
To clear the entire procedure cache execute
DBCC FREEPROCCACHE
4
votes
3
votes