Home Page for the TeradataForum
 

Archives of the TeradataForum

Message Posted: Wed, 28 May 2003 @ 14:14:38 GMT


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


Subj:   Alter table vs. create copy for add column
 
From:   Anomy Anom

<-- Anonymously Posted: Wednesday, May 28, 2003 10:00 -->

There are two methods of adding a column (not null with default or nullable) to an existing table

1) Alter table

2) Create a copy of the table with the new column, do an insert select to move the data, drop old table, rename copy

I have always used option 2 for the following reasons

i) table is only unavailable for a few seconds during the rename (data copy and statistics collection can be done concurrent with user access)

ii) blocksize considerations moving forward

I've recently changed companies and the new shop is adamant that alter table is the only way to go. I'm looking for pros and cons of both methods. What does everybody else do and why.



     
  <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