Home Page for the TeradataForum
 

Archives of the TeradataForum

Message Posted: Thu, 25 Sep 2014 @ 15:51:08 GMT


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


Subj:   Re: Efficient Delete in Teradata
 
From:   Bakthavachalam, Roopalini

Roopalini Bakthavachalam wrote:

  What is the most efficient way to delete (say < 50,000) records from a table which has 1.5 billion records? Here is the query and data demographics. The PPI in TABLE1 is not being used due to the condition T1.DATE_CLOUMN1 > T2.DATE_COLUMN2.  


          > DELETE T1
          > FROM TABLE1 T1,
          > TABLE2 T2,
          >                 TABLE3 T3
          > WHERE T1.COLUMN1= T2.COLUMN1
          > AND T1.COLUMN1= T3.COLUMN1
          > AND T1.DATE_CLOUMN1 > T2.DATE_COLUMN2
          > AND T2.COLUMN3 ='ABC'
          >
          >
          > T1.COLUMN1 IS INTEGER and part of the UPI in TABLE1
          > T1.DATE_COLUMN1 is DATE and PPI of TABLE1
          > T2.COLUMN1 is INTEGER and not part of any index in TABLE2
          > T2.DATE_COLUMN2 is DATE and not part of any index in TABLE2
          > T3.COLUMN1 is INTEGER and part of UPI in TABLE3
          >
          >
          > Record count
          >
          > TABLE1 - 1.5 Billion
          > TABLE2 - 93
          > TABLE3 - 97

Forum - Any response for this? I still have not figured out this.


Thanks

Roopalini



     
  <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