Wednesday, December 8, 2010

Clear Execution Plan for Stored Procedure

Whenever we execute stored procedure, execution plan is generated and used by database engine while executing the same stored procedure next time. However, for debug purpose we need to log time taken by stored procedure with different sets of data. The execution plan must be cleared to record exact time taken by each set of data. For this purpose Microsoft has provided few Database Console Commands. 

DBCC freeproccache can be used to clear the all execution plan stored. 

For further details on this read at

No comments: