Home Page for the TeradataForum
 

Archives of the TeradataForum

Message Posted: Tue, 02 May 2006 @ 09:45:05 GMT


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


Subj:   Re: Problem Creating SEQUENCE using Identity column
 
From:   Kohut, Eric J

This is working as designed.

Teradata's identity is not supposed to be a sequential or SEQUENCE number.

It is supposed to be a unique number and the result will be unique.

As I understand it, since this funciton is implemented to run in parallel independently, the 100,000 value jump is caused by the value being created on a different amp. I.E. Each amp has a bucket of 100,000 values to use to create a unique numbers for that amp's rows and then it will go back and get another 100,000 bucket of values to continue creating unique numbers.

The size of this bucket may be changed but changing the value can have an impact on both the results (assigned numbers) as well as the speed of assignment. They will still be unique. I believe if you set this value to 1 you may get a sequence # but you will also will run the entire process on a single amp which will not be parallel.

If you need a sequence number from Teradata, then you should load the rows into a table on Teradata and then run a SQL with CSUM(1, PK column list) for the column to assign a sequence number where 1 is the seed value. If you need the value returned to be bigger than an integer, then you may want CSUM(1 (decimal(16,0)), PK column list). There is also a SUM Windows function that can replace CSUM.


Good Luck,

Eric



     
  <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