Home Page for the TeradataForum
 

Archives of the TeradataForum

Message Posted: Tue, 06 Mar 2007 @ 17:52:48 GMT


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


Subj:   Re: Performance of a self join
 
From:   GrossD

Goutham,

Try eliminating the derived table all together (projection B) and fully commit to OLAP (thus eliminating the join)

     Select
     A.*,
        Count(metric2) over
                    (Partition By dim1, dim2, dim3, dim4, dim5) As d2 ,
        Sum(Value2) over
                    (Partition By dim1, dim2, dim3, dim4) As d3,
        metric1 / d2 As whatever,
        Value2 / d3 As value3
     From A

Don Gross



     
  <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