|
Archives of the TeradataForumMessage Posted: Mon, 14 Mar 2005 @ 22:11:30 GMT
Bill, Have you explained the update statement with the input data type? What is your UPI data type? I have seen locking issues where the locking is at the table level unless the input data is the same data type as UPI/NUPI column. The utility VARTEXT input data format may be contributing to the locking. The explain output should show a write lock on the table vs. row- level. --If the TransactionControlNumber is numeric (decimal/integer/etc.) and the input data is character explain using (TCN VARCHAR(17) ) UPDATE xxxx.claimheader Set FinalVersionInd = 'N' Where TransactionControlNumber = :TCN; --should see similar explain output for all-amp full table lock 1) First, we lock xxxx.claimheader for write. -- Vs. the TransactionControlNumber is numeric (decimal/integer/etc.) and the input data is also numeric explain using (TCN decimal(15,0) ) UPDATE xxxx.claimheader Set FinalVersionInd = 'N' Where TransactionControlNumber = :TCN; --should see similar explain output for row-level lock 1) First, we do a single-AMP RETRIEVE step from xxxx.claimheader by way of the unique primary index "xxxx.claimheader.TransactionControlNumber = :TCN" 2) Next, We do a single-AMP MERGE into xxxx.claimheader from Spool 2 (Last Use). 3) We do a single-AMP UPDATE from xxxx.claimheader by way of the unique primary index "xxxx.claimheader.TransactionControlNumber = :TCN" with no residual conditions. Kyle Prescott
| ||||||||||||||||||||||||||||||||||||||||||||||||
| ||||||||||||||||||||||||||||||||||||||||||||||||
Copyright 2016 - All Rights Reserved | ||||||||||||||||||||||||||||||||||||||||||||||||
Last Modified: 15 Jun 2023 | ||||||||||||||||||||||||||||||||||||||||||||||||