-
Type: Feature Request
-
Status: Awaiting Stories (View Workflow)
-
Priority: Critical
-
Resolution: Unresolved
-
Affects Version/s: None
-
Fix Version/s: None
-
Component/s: None
-
Labels:
The Deduct* procs are the most deadlocking procedures in the database, and should be able to be modified simply to reduce the number of deadlocks.
The suggestion from the SQL optimization consultant is:
- Remove “WITH (ROWLOCK)” when updating live tables. Let SQL decide the best lock to use.
i.e. :
From :UPDATE tbItemQty WITH (ROWLOCK) SET fOnHand_qty -= @Quantity, fAvailable_qty -= @Quantity WHERE EntityID = @EntityID AND ItemID = @ItemID
To :
UPDATE tbItemQty SET fOnHand_qty -= @Quantity, fAvailable_qty -= @Quantity WHERE EntityID = @EntityID AND ItemID = @ItemID
Also, there are 5 procs that all update the same tables in the same order
qryMMSInventory_DeductWaste
qryMMSInventory_DeductSale
qryMMSInventory_DeductProductionUse
qryMMSInventory_DeductInternalUse
qryMMSInventory_DeductEOD
But the proc qryMMSInventory_StockCount updates the same tables but in different order and causes blocking. I suggest this proc gets amended to do the updates in the same order as the qryMMSInventory_Deduct procs.
- Is Clone Of
-
CFAMX-12402 Flood Load Testing Tech debts
- Open
- is implemented by
-
CFAMX-10248 Augment/Create Load Tests
- Open
-
CFAMX-10249 Documentation
- Open
1.
|
Modify sprocs | Ready for Developer | Unassigned |
|
|||||||
2.
|
Test new procedures | Ready for QA | Unassigned |
|