If you want to clear execution plan and cache, you could
use the below commands
DBCC FreeProcCache
DBCC DropCleanbuffers
If you want to force query compilation each time, just add the below to the end of the query
DBCC FreeProcCache
DBCC DropCleanbuffers
More details here
https://msdn.microsoft.com/en-us/library/ms174283.aspxIf you want to force query compilation each time, just add the below to the end of the query
OPTION (RECOMPILE)
No comments:
Post a Comment