Home Page for the TeradataForum
 

Archives of the TeradataForum

Message Posted: Tue, 28 Aug 2007 @ 13:54:16 GMT


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


Subj:   Re: Adding new columns to an 11 billion row table
 
From:   Dan Linstedt

The quickest answer is to actually move the table to a new table structure with the new columns. If you structure the table with the same key, it will keep the same partitioning - and in doing so, the INSERT INTO...SELECT FROM will work ALL the nodes in parallel, and won't move the data off the nodes at all.

You can append columns, but with the NOT NULL constraint is a problem, and a default value to top it off. If you're going this route, then add the columns NULLABLE, populate them (which will take a very long time), then change the constraint to NOT NULL.

If you use the table "copy" then your source table doesn't have to be "down" at all, but you will need significant disk space for that to work.


Cheers,

Dan Linstedt



     
  <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