Sql Server, Query Optimization.
@ParameterValue '; -- Define your parameter value (if applicable) DECLARE @ParameterValue INT = 123; -- Obtain the plan handle for the query DECLARE @PlanHandle VARBINARY(64); SELECT @PlanHandle = plan_handle FROM sys.dm_exec_query_stats CROSS APPLY sys.dm_exec_sql_text(sql_handle) WHERE [text] =