@@ -2585,7 +2585,7 @@ WITH XMLNAMESPACES('http://schemas.microsoft.com/sqlserver/2004/07/showplan' AS
2585
2585
IndexOps AS
2586
2586
(
2587
2587
SELECT
2588
- r .sql_handle ,
2588
+ r .query_hash ,
2589
2589
c .n .value (' @PhysicalOp' , ' VARCHAR(100)' ) AS op_name,
2590
2590
c .n .exist(' @PhysicalOp[.="Index Insert"]' ) AS ii,
2591
2591
c .n .exist(' @PhysicalOp[.="Index Update"]' ) AS iu,
@@ -2603,7 +2603,7 @@ IndexOps AS
2603
2603
OUTER APPLY r .relop .nodes (' /p:RelOp/p:SimpleUpdate/p:Object' ) o3(n)
2604
2604
), iops AS
2605
2605
(
2606
- SELECT ios .sql_handle ,
2606
+ SELECT ios .query_hash ,
2607
2607
SUM (CONVERT (TINYINT , ios .ii )) AS index_insert_count,
2608
2608
SUM (CONVERT (TINYINT , ios .iu )) AS index_update_count,
2609
2609
SUM (CONVERT (TINYINT , ios .id )) AS index_delete_count,
@@ -2617,7 +2617,7 @@ IndexOps AS
2617
2617
WHERE ios .op_name IN (' Index Insert' , ' Index Delete' , ' Index Update' ,
2618
2618
' Clustered Index Insert' , ' Clustered Index Delete' , ' Clustered Index Update' ,
2619
2619
' Table Insert' , ' Table Delete' , ' Table Update' )
2620
- GROUP BY ios .sql_handle )
2620
+ GROUP BY ios .query_hash )
2621
2621
UPDATE b
2622
2622
SET b .index_insert_count = iops .index_insert_count ,
2623
2623
b .index_update_count = iops .index_update_count ,
@@ -2629,7 +2629,7 @@ SET b.index_insert_count = iops.index_insert_count,
2629
2629
b .table_update_count = iops .table_update_count ,
2630
2630
b .table_delete_count = iops .table_delete_count
2631
2631
FROM #working_warnings AS b
2632
- JOIN iops ON iops .sql_handle = b .sql_handle
2632
+ JOIN iops ON iops .query_hash = b .query_hash
2633
2633
OPTION (RECOMPILE );
2634
2634
2635
2635
0 commit comments