Home Page for the TeradataForum

Archives of the TeradataForum

Message Posted: Wed, 28 Mar 2007 @ 10:56:38 GMT

  <Prev Next>   <<First <Prev Next> Last>>  

Subj:   Re: Pseudo Tables in EXPLAIN
From:   Lokare, Parag

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.


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


  <Prev Next>   <<First <Prev Next> Last>>  
  Top Home Privacy Feedback  
Copyright for the TeradataForum (TDATA-L), Manta BlueSky    
Copyright 2016 - All Rights Reserved    
Last Modified: 28 Jun 2020