Quantcast
Channel: Microsoft Dynamics AX Forum - Recent Threads
Viewing all articles
Browse latest Browse all 72043

Blocking when inserting into CUSTTRANS table

$
0
0

This is Dynamics AX 2012 R2, on SQL 2012 SP2.

DynamicsPerf is showing a ton of blocking when inserting into CUSTTRANS table, looks like the lead blocker is blocking other inserts to same table.  The blocked process report shows it is due to a key lock on the clustered index key, which is defined with is_unique = 0.  I am thinking if the clustered index were to be unique, then the issue would be resolved.  Would that be the proper solution here? 

Looking at the clustered index definition, the key columns are : [PARTITION], [DATAAREAID], [ACCOUNTNUM], [TRANSDATE], [VOUCHER].  Looking at the data, the only column that could be added to ensure uniqueness is RECID.  But looking at the indexes, there is already a nonclustered index on with key column RECID, and INCLUDES  the same five columns - PARTITION, DATAAREAID, ACCOUNTNUM, TRANSDATE, VOUCHER.

Looking at sp_blitzindex stats for the table, over the past month and a half, both indexes have equal number of lock escalation attemps (~30K), singleton lookups (~8 mil), seeks (~1.7k).  But the clustered index has ~1.5k lookups. 

I am wondering then if the clustering key could be swapped to the RECID index instead?


Viewing all articles
Browse latest Browse all 72043

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>