Home Page for the TeradataForum
 

Archives of the TeradataForum

Message Posted: Thu, 19 Apr 2012 @ 15:31:56 GMT


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


Subj:   Use of Negative Values Instead of NULL
 
From:   Nathan_S_Smith

Hi,

Our DBA has recently recommended replacing NULL values in foreign key (FK) reference columns with a -1 * the primary index (PI) value.? Note this only works where both the FK and PI are numeric.

The reasoning is on large transaction tables where the FK may have a large percentage of rows with NULL values, the computation will distribute the rows when the FK is used in a join relationship reducing skew.

I would like to know whether a large percentage of NULL values in a FK is a problem which deserves special treatment.? If so, what would be a recommendation for non-numeric values?

For numeric values to determine NULL rows, the query could search on less than zero; however, finding non-numeric NULL values would seem problematic.


Thanks,

Nathan



     
  <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