Home Page for the TeradataForum
 

Archives of the TeradataForum

Message Posted: Thu, 27 Dec 2012 @ 09:53:33 GMT


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


Subj:   Re: Deleting rows from a table which EXIST in another table
 
From:   Anomy Anom

<-- Anonymously Posted: Thursday, December 27, 2012 02:57 -->

Thanks for the reply


  Have you tried this ?  


          > delete from large_table
          > WHERE (Col1,Col2)
          > IN (SELECT Col1,Col2 from exceptions_table GROUP BY 1,2);

This approach doesn't get around my desire not to have to type all the column names out.


  The above query may take hours to delete the data if the table is having 100GB or above data.  


The delete should be very quick as there are only a very small number of rows to be removed and therefore transient journal processing should be minimal. The impact of the size of the table on query performance would depend on the number of Amps on the system.


  To deal with GB or TB data deletion, you can use MULTILOAD DELETE mode option.  


My desire was to delete a tiny number of rows but I hadn't thought of export / mload delete. Doubt it would be any less typing but thanks for the suggestion.



     
  <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