Home Page for the TeradataForum
 
https:

Archives of the TeradataForum

Message Posted: Wed, 15 May 2002 @ 06:52:59 GMT


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


Subj:   Re: Sequential number generation
 
From:   Dieter Nöth

  Why even bother with the key column(s)?  


  Use csum(1,1). But I have still not verified if this would avoid the costly sort...  



This is the worst thing you can do.

All rows are redistributed according to the order cols (1). So in spool _all_ rows are located on a single AMP. You should always specify cols with a good distribution, PI cols are fine. If you have to many cols and it's a query without join, just use csum(1,rowid) or rank(rowid).


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: 28 Jun 2020