We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 6a05365 commit b70b326Copy full SHA for b70b326
1 file changed
sp_BlitzCache.sql
@@ -1617,7 +1617,7 @@ WITH total_plans AS
1617
COUNT_BIG(qs.query_plan_hash) AS duplicate_plan_hashes
1618
FROM sys.dm_exec_query_stats qs
1619
LEFT JOIN sys.dm_exec_procedure_stats ps
1620
- ON qs.sql_handle = ps.sql_handle
+ ON qs.plan_handle = ps.plan_handle
1621
CROSS APPLY sys.dm_exec_plan_attributes(qs.plan_handle) pa
1622
WHERE pa.attribute = N'dbid'
1623
AND qs.query_plan_hash <> 0x0000000000000000
0 commit comments