Home Page for the TeradataForum
 

Archives of the TeradataForum

Message Posted: Tue, 27 Nov 2007 @ 13:05:09 GMT


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


Subj:   Delete Statement taking a long time to run.
 
From:   Anomy Anom

<-- Anonymously Posted: Tue, 27 Nov 2007 18:26 -->

Hi Everyone,

I have a bteq script in which the DELETE statement is taking around 14 minutes to run.

The statement is

     DELETE EDW1
     FROM employee EDW1,
           deptt   EDW2
     WHERE EDW1.employee_id = EDW2.employee_id
     AND EDW1.deptt_code = EDW2.deptt_code
     AND EDW2.deptt <> 'D'
     ;

The number of records deleted with this statement is around 4325698. I did COLLECT STATISTICS on the UPI columns (employee_id , deptt_code). But this did not help to decrease the time.

Is there any way to optimise the query to minimise this time?

Any help would be appreciated


Thanks in advance!!!



     
  <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