Home Page for the TeradataForum
 

Archives of the TeradataForum

Message Posted: Thu, 26 Jun 2003 @ 15:09:46 GMT


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


Subj:   Re: Question about HASHROW
 
From:   Michael Larkins

Hi Joe:

Here is my take on your discovery.

Since HASHROW returns a 32-bit value, the largest positive number that it can return is: 2,147,483,647. Even if the sign bit is used (as low as 2,147,483,648-), there are only slightly more than 4B possible values with which to work. Therefore, you are very likely to get some duplicate values as "hash synonyms" (different data values that hash to the same value).

Teradata deals with this situation by including the 32-bit Uniqueness Value. It is also stored as part of the data row along with the row hash to build the ROWID for every row in a table. This allows for unique row reads via a secondary index. So, your attempt to use this is misguided and not advised.

Teradata does not require the use surrogate keys because it does not require a unique value. Are you sure that you would not be better off just using the data values (even as a NUPI) in your columns for identification?


Regards,

Mike



     
  <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: 15 Jun 2023