|
Archives of the TeradataForumMessage Posted: Wed, 28 Mar 2007 @ 10:56:38 GMT
Pseudo Tables LOCKS Case 1 (when no Pseudo Tables were present) Consider a table A. This table is distributed across a number of AMPS (say 4 AMPS). User1 wants to update table A, so he needs to acquire locks for ALL AMPS. His session starts from AMP1 , lock table , then AMP2, lock table. User2 also wants to update same table A at the same time, so starts acquiring locks Say the session starts from AMP4, lock table , then AMP3 lock table. Now user1 needs to lock table in AMP3 but its not free as User2 has the lock. Also user2 needs lock on AMP2 but its not free. HENCE a deadlock. Now PSEUDO Table comes into picture. CASE2 The Table ID is hashed. This hash value takes to a particular AMP. So user1 session goes to that AMP first and locks it. Then all other AMP's. When user2 comes for a lock he also gets hash value (same hash value same AMP)and goes to that AMP, but sees a lock already present. Hence no dead locks. Pseudo Table act as gateways. Thanks and Regards Parry
| ||||||||||||||||||||||||||||||||||||||||||||||||
| ||||||||||||||||||||||||||||||||||||||||||||||||
Copyright 2016 - All Rights Reserved | ||||||||||||||||||||||||||||||||||||||||||||||||
Last Modified: 15 Jun 2023 | ||||||||||||||||||||||||||||||||||||||||||||||||