Skip to content

Commit b70b326

Browse files
#3314 sp_BlitzCache high percentage of duplicate plans
Fixes #3314
1 parent 6a05365 commit b70b326

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

sp_BlitzCache.sql

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1617,7 +1617,7 @@ WITH total_plans AS
16171617
COUNT_BIG(qs.query_plan_hash) AS duplicate_plan_hashes
16181618
FROM sys.dm_exec_query_stats qs
16191619
LEFT JOIN sys.dm_exec_procedure_stats ps
1620-
ON qs.sql_handle = ps.sql_handle
1620+
ON qs.plan_handle = ps.plan_handle
16211621
CROSS APPLY sys.dm_exec_plan_attributes(qs.plan_handle) pa
16221622
WHERE pa.attribute = N'dbid'
16231623
AND qs.query_plan_hash <> 0x0000000000000000

0 commit comments

Comments
 (0)