Archives of the TeradataForum 
 
 
Message Posted: Mon, 26 Sep 2005 @ 11:03:24 GMT 
 
  
 
 
 
 
  
|  Subj:  |   |  Re: The use of ID Columns  |   
|     |   
|  From:  |   |  Dieter Noeth  |   
  
 
 
  
Naveen Ram Prasanna Kambhoji wrote: 
|     | How far is it beneficial to define an Identity Column as PI in DWH Applications. |     |  
 
  
In theory a PK (value and definition) should never change, but in reality it does. If you use a dumb artifical PK (doesn't have to be a
sequence) you'll probably never encounter that problem. 
But this is about Primary *Key* not Primary *Index*, you should always chosse a PI based on access/joins/distribution. 
Btw, in other DBMSes this might be a good idea, because they don't like to join on multiple columns or varchars... 
 |     | I heard that joins to ID columns almost always require row distributions. |     |  
 
  
If the sequence is the PI then not. 
 
  
Because it's a rumour and rumours tend to be wrong :-) 
 |     | Also what if I want to add more constant values for a multivalued compressed column. |     |  
 
  
     create new table -> insert/select -> drop old table -> rename
 That's the only way, you'll need twice the perm space (old + new) and enough spool (even if PI is the same and it's a "ins new sel * from
old") 
 Dieter 
 
 
 
 
   
 
 |