We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents 1aff099 + a79a9dd commit ba1bb20Copy full SHA for ba1bb20
sp_BlitzCache.sql
@@ -1616,8 +1616,7 @@ WITH total_plans AS
1616
SELECT
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
+ LEFT JOIN sys.dm_exec_procedure_stats ps 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 pa.value <> 32767 /*Omit Resource database-based queries, we're not going to "fix" them no matter what. Addresses #3314*/
0 commit comments