Home Page for the TeradataForum
 
 

 

Archives of the TeradataForum





Message Posted: Thu, 10 Nov 2005 @ 16:46:02 GMT





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




Subj:   Re: Simple PPI question
 
From:   Diehl, Robert



Something like this should work. You will need to change the databasenaem, tablename, primary index, date range and interval

     alter table databasenaem.tablename
     modify primary index (session_id)
     ADD RANGE between DATE '2004-12-16' AND DATE '2004-12-31' EACH INTERVAL
     '1'
     Day
     ;

To drop an partition:

     alter table databasenaem.tablename
     modify primary index (session_id)
     drop range between DATE '2004-08-01' AND DATE '2004-08-31'  EACH
     INTERVAL '1' DAY with delete

NOTE: if you have NORANGE UNKNOWN on the tables. It will not delete the data. It will just move it to the UNKNOWN range.

If you have to have no range unknown on tables, I receommend doing multiload deletes then dropping the range. It can take a long time to move the data between partitions leaving you exposed to a rollback.


Thanks,

Bob Diehl
Travelocity.com





     
  <Prev Next>   <<First <Prev Next> Last>>  
 
 
 
 
 
 
 
 
  
 
  Top Home Join Privacy Feedback  
 
 
Copyright for the TeradataForum (TDATA-L), Manta BlueSky 
Last Modified: 30 Jun 2008