All Forums Analytics
Sankalp.C 45 posts Joined 08/13
10 Dec 2013
While we add New AMP

While we add New AMPs does the existing HASHMAP got changed as new AMPs are being added. If so, How the existing AMPs got changed according to that as the HASHMAP and The  ROWID have to incorporate the change accordingly to make sure there are No data Loss.

M.Saeed Khurram 544 posts Joined 09/12
10 Dec 2013

hi,
well, this is a complex process that obviously can not be explained in few lines here, you will have to read the documentation and manuals to understand it fully. 
in simple words adding a new amp initiates a hashmap reconfiguration process. In every TPA node there are 4 types of hashmaps:

  1. Current Configuration Primary
  2. Current Configuration Fallback
  3. Reconfiguration Primary
  4. Reconfiguration Fallback.

So when ever a new amp is added, a reconfiguration prcess is initiated, Primary and Reconfiguration primary hashmaps are compared and the affected rows are moved to new amps. 
the formula to calculate the % of rows to be moved is:
% of rows to be moved to new amps = Number of new amps / Old amps + New amps
For detailed explaination you will have to read documentation.
 
 

Khurram

Sankalp.C 45 posts Joined 08/13
10 Dec 2013

Thanks! is it possible to share the link of the required document.

M.Saeed Khurram 544 posts Joined 09/12
10 Dec 2013

Yes sure, you can read about reconfiguration and a lot more at the link below:
http://www.info.teradata.com/htmlpubs/DB_TTU_14_00/index.html#page/Utilities/B035_1180_111A/Reconfig.15.04.html
 

Khurram

Sankalp.C 45 posts Joined 08/13
11 Dec 2013

Thanks!

ToddAWalter 316 posts Joined 10/11
11 Dec 2013

The RowIDs do not change when AMPs are added. A new hasmap is created to balance hashbuckets across the new configuration of AMPs, then rows within buckets that have moved are moved to their new AMP by the reconfig utility.

Sankalp.C 45 posts Joined 08/13
12 Dec 2013

In that case Todd,
the existing rowids got changed to new ones right?

M.Saeed Khurram 544 posts Joined 09/12
12 Dec 2013

Hi Sankalp,
RowID = ROW HASH + UNIQUENESS VALUE
Row hash is detemined by the PI value, So when ever a reconfiguration occurs, the rows are just moved to the new amps because the Row Hash in the new hashmap will point to some new amps. 
There is nothing changed to the row or rowids, its just a transparent movement performaed by Teradata.
 

Khurram

Sankalp.C 45 posts Joined 08/13
12 Dec 2013

Yes, agree with that. But my question is-
example
previously -
RowID(010101..001001)=ROWHASH(010101 --- AMP5)+(001001 ---uniqueness value)
After ading new amp,
RowID(?)= ROWHASH(100101----AMP9 as data is now in AMP9)+(10010 --uniqueness value for the amp)
Am I wrong any where?
 

M.Saeed Khurram 544 posts Joined 09/12
12 Dec 2013

san,
The simple answer is: 
RowID(010101..001001)=ROWHASH(010101 --- AMP9)+(001001 ---uniqueness value)
as a result of reconfiguration the hashmap is changed, the same ROWHASH passed to the new hashmap will move the row to AMP9.
the row hash was determined based on PI and is not going to change :)
 

Khurram

Sankalp.C 45 posts Joined 08/13
13 Dec 2013

Perfect! :)

You must sign in to leave a comment.