Archives of the TeradataForum
Message Posted: Thu, 19 Apr 2012 @ 15:31:56 GMT
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.
|Copyright 2016 - All Rights Reserved|
|Last Modified: 23 Jun 2019|