Home Page for the TeradataForum
 

Archives of the TeradataForum

Message Posted: Wed, 28 May 2003 @ 14:31:55 GMT


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


Subj:   Re: Alter table vs. create copy for add column
 
From:   Doug Cox

It really depends on what the table is being used for and how it's accessed...

-Altering will lock the table up for sure. But during the lock at least you know people can't get to it..

-It will put the column at the end of the table. Which is sometimes unacceptable.. Some companies like timestamps to be the last column..

-It will also preserve the statistics collected so you don't have to redo them...

If I have the time - I usually do a create>insert>rename>collect stats.. Or even better a "Create table as(with no data)" then insert select with the new data for the column.

But the bottom line is - I generally follow whatever the rule is at any job I start at..

Doug



     
  <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: 27 Dec 2016