Home Page for the TeradataForum
 

Archives of the TeradataForum

Message Posted: Thu, 11 May 2006 @ 14:10:48 GMT


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


Subj:   Re: Partioin primary index
 
From:   Victor Sokovin

  How to change existing table 's primary index to Partition primary Index.  


  Ex: I have table with 200 miliion records contianing Primary Index has date column with other columns.  


  I want to change this table as Unique Partition Primary Index based on date range  


You might want to check out the ALTER TABLE syntax and try it on a "small copy" of the table (same definition but just a small sample of data). It may or may not work, which depends on how your current PI is defined. Was it already a UPI? If interested, check the manual for what exactly is possible.

If ALTER TABLE does not work you can always create a new table with the PPI definition of your choice, transfer the data from the old table to this new one, drop the old table and rename the new one to the old name. As always, you have to be careful with all dependent structures such as triggers, JI, SI, etc., and you might need to recollect stats on the new table.

Actually, the second scenario is probably better (although it implies more work and impact on the database and users) than the ALTER TABLE method because it reduces such risks as, say, ARC not recognizing the new table structure after partitioning etc. In this respect it might be safer to start from a new empty table.


Regards,

Victor



     
  <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