Home Page for the TeradataForum
 

Archives of the TeradataForum

Message Posted: Thu, 08 Oct 2009 @ 15:36:12 GMT


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


Subj:   Re: Identity column experiences
 
From:   Curley, David

We didn't have to do it across different environments, but we did have multiple tables using identity fields to create an ID unique over all tables. The approach we used should work over any combination of platforms provided you can specify the start value and increment. Just start each table with a different number but use the same increment for all of them, with the provision that the increment is equal to or larger than the number of tables involved. Essentially, you want to assure that 1) for any table, identity mod increment is a constant; and 2) identity mod increment is unique for each table in the system.

I think the main Teradata-related issue we had was making sure we had a large enough number space given that identities are not necessarily assigned sequentially. In our case, we were pretty confident that the system would be retired soon enough for use to stick with an integer datatype provided we started with the smallest (most negative) negative number possible and worked from there. If you start at 0, you've effectively halved the possible values.

We've had no issues with the system so far, including going from 2r5 to 2r6 (the system will be retired by the time we get to 12). We haven't had to do any sort of rebuild/restore on these, so can't comment on that.


Dave



     
  <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