Sparse MAPS and Fallback

Blog
The best minds from Teradata, our partners, and customers blog about relevant topics and features.
Teradata Employee

Fallback is a reliability feature that stores a second copy of each row on an alternative AMP in the event that the primary copy becomes unavailable. If an AMP fails, the fallback copy is automatically accessed. Where possible, the fallback copy of a row is inserted on an AMP on another node that is in a different clique.

 

If a table has fallback defined, the fallback AMPs for a primary AMP are included in the range of AMPs that are defined for the contiguous map. In other words, both primary and fallback copies share the same contiguous map. In the initial software release for the MAPS feature (Teradata Database 16.10), fallback rows are not allowed to be placed on AMPs that are not included in the contiguous map where the primary rows are located.

 

However, fallback placement works a little differently when a table is moved to a sparse map.

 

Consider a single-AMP sparse map. Primary rows are placed on one AMP when a table is moved to a single-AMP sparse map. However, if that table uses fallback, the fallback rows will go on a different AMP, an AMP that does not support the table's primary rows, and which seemingly is not part of that single-AMP sparse map. The only rule that must be followed is that the fallback AMP must be part of the parent contiguous map.

 

Note that even if a table is non-fallback, the table header is still assigned to both the primary AMPs and the fallback AMPs within the sparse map. So you may see some slight perm space on the would-be fallback AMPs for such a table.

 

The view DBC.SparseMapAmpsV allows you to see the assigned AMP numbers for tables that reside in sparse maps. The column “PF” indicates whether the row is pointing to the AMP for the primary copy (P) of the data or the fallback copy (F), or both (PF).

 

Below is an example of a Demographics table with 7,200 rows that has been moved to a 6-AMP sparse map.

 

This SQL tells you which 6 AMPs are holding the primary (P) and fallback (F) rows for the Demographics table within the sparse map:

 

SELECT

ObjectName, AmpNo, PF

FROM DBC.SparseMapAmpsV

WHERE databasename = 'cab'

AND objectname = 'Demographics'

ORDER BY 1,2;

 

ObjectName

AmpNo

PF

Demographics

68

PF

Demographics

69

PF

Demographics

70

P

Demographics

71

F

Demographics

138

PF

Demographics

139

PF

Demographics

140

P

Demographics

141

F

 

 

In the above example, you can see that some AMPs hold only primary data, some hold only fallback data, and some AMPs hold both primary and fallback rows. Some of the fallback rows are within the sparse map AMPs, and some are not. This is normal behavior.  This is defined as a 6-AMP sparse map, but requires 8 AMPs to support both primary and fallback copies.