Home Page for the TeradataForum
 

Archives of the TeradataForum

Message Posted: Sat, 21 Nov 2009 @ 10:27:44 GMT


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


Subj:   Query tuning - same step running twice
 
From:   S T Mistry

Hi Folks

I just re worked a BO Query and got things to acceptable SLA. I noticed these steps in the explain and wonder WHY would the optimizer bother to do them

32 0:44.08 5:06.90 6011942 473720300
We do an All-AMPs JOIN step from Spool 31050 (Last Use) by way of an all-rows scan, which is joined to Spool 31103. Spool 31050 and Spool 31103 are left outer joined using a MINUS ALL join. The result goes into Spool 31104, which is built locally on the AMPs.

33 0:44.08 6011942
We do an All-AMPs RETRIEVE step from Spool 31104 (Last Use) by way of an all-rows scan into Spool 31105, which is built locally on the AMPs. This step begins a parallel block of steps.


So per the above 31104 is locally built on AMP's - fine. So why is is AGAIN selecting * from 31104 and repeating the process and building the same locally on the AMP's. The row estimates are also the same and Step # 33 is turning out to be a bit costlier than Step # 32 . Why Step # 33 Any idea how this can be avoided .



     
  <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