«

»

Feb 24

Collision or Synonym in Teradata



Teradata is consistent with hashing a value. It means that when Teradata hashes the Index value (e.g. ‘teradatatech’) it will come up with a Row Hash. Now if Teradata hashes the same index value (‘teradatatech’) million times it will always come up with the same Row Hash. Teradata always hashes the same value with consistent results.

However, Teradata can hash two very different values and the result can sometimes be the same Row Hash. This is a called a Collision. It is sometimes called a Synonym.


The AMP always double checks the Primary Index Value to insure it is getting the correct row. The AMP double checks because it is afraid if it does not it could get the wrong row because of a Collision!

Teradata searches for a Primary Index value by hashing the Primary Index Value and then using the Row Hash and the Hash Map to point to a specific AMP. The AMP then uses using a Binary Search of the Row Hash to find the row it is looking for.


For e.g. we have the name ‘teradatatech’ and ‘teradata’ and that they both have the same Row Hash of 11000. This is a collision.


This is why the AMP double checks. It finds ‘teradatatech’ with a binary search on 11000, but checks the value for integrity.

↓↓↓↓↓↓↓↓ SHARE IT WITH YOUR FRIENDS  ↓↓↓↓↓↓↓↓

4 pings

Leave a Reply to Teradata Guide Cancel reply

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>

This site uses Akismet to reduce spam. Learn how your comment data is processed.