Home Page for the TeradataForum
 

Archives of the TeradataForum

Message Posted: Wed, 14 Oct 2009 @ 13:29:20 GMT


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


Subj:   Re: Integer data types vs. Decimal(n,0) - which is better?
 
From:   Dieter Noeth

Boris Mogilevsky wrote:

  Dieter, thanks for the explanation, though the last part is not very clear to me.  


A sequence in Teradata is not sequential, it's parallel.

For INSERT VALUES the PEs assign values, for INSERT SELECT the source AMPs.

In an x AMP system each AMP will retrieve a batch of values from dbc.IDcol and the default size of that batch is 100.000 (based on dbscontrol general field 27. IdCol Batch Size).

Thus the first INS/SEL on a 2000 AMP (and there are some system with even larger numbers) system will already reserve 200.000.000 possible values.

During a restart all sequence info is lost, because it's kept in memory only. The next INS/SEL after that restart request another 200.000.000 values. After 9 restarts the AvailValue in dbc.IDcol will be 2.000.000.001, which is already close to the maximum value of an integer, and the next INS/SEL will hit the limit (unless CYCLE is used). Starting with -2.147.483.648 just adds another 10 restart.


Dieter



     
  <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