Quantcast
Channel: Teradata Forums - All forums
Viewing all articles
Browse latest Browse all 27759

Should a SCD table contain a UPI including date fields or use a natural key? - response (1) by sachin.sebastian

$
0
0
Tables that have historical records may always not be used with condition on Date columns. In most cases we would be interested only in the latest active record; While rarely a retrofit run (back dated run) may need to use the history data. The issue with using UPI which includes Date fields also, is while Joining with other tables you need to use all the columns including the Date fields in the JOIN condition to get optimum performance. So PI on acct_id will be better, since we expect multiple joins in the Fact-Dimension model. Having one of the fields of PI that is NULL-able (end_dt) is also not optimal. If possible have all columns as NOT NULL in PI

Viewing all articles
Browse latest Browse all 27759

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>