Contents tagged with query plan
-
T-SQL code for TOP N Worst Performing Stored Procedures
T-SQL code for TOP N Worst Performing Stored Procedures
-- ============================================================
-- Author: Eli Leiba
-- Create date: 2018-02
-- Description: … more
-
Show Query Plan of a Running Query in SQL Server
SELECT QP.query_plan as [Query Plan], ST.text AS [Query Text]FROM sys.dm_exec_requests AS R CROSS APPLY sys.dm_exec_query_plan(R.plan_handle) AS QP CROSS APPLY sys.dm_exec_sql_text(R.plan_ … more