Thursday 17 January 2019

MSSql Server execution plan creation query for procedure


Drop existing cache plan and buffer 


Dbcc FreeProcCache
Dbcc dropCleanBuffers





Select all created execution plan sql query


SELECT *

FROM sys.dm_exec_cached_plans
    CROSS APPLY sys.dm_exec_sql_text(plan_handle)