Generating a unique row number

Teradata Database distributes rows to AMPs based on the hash values generated by the hash map algorithm. This data distribution algorithm is easy and efficient. The primary index of the table defines where the data will reside in which AMP. The uniqueness of this primary index becomes very important when distributing rows to AMPs.

If data is skewed, meaning residing on one or few AMPs, a query using the index becomes slow in processing and also causes space issues in the database:

 

This uniqueness of rows can be generated using the following methods:

  • Based on original data
  • ETL process, outside Teradata

The ...

Get Teradata Cookbook now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.