Home Page for the TeradataForum
 

Archives of the TeradataForum

Message Posted: Mon, 05 Mar 2007 @ 15:11:41 GMT


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


Subj:   Performance of a self join
 
From:   Goutham P

Can anyone please let me know if there is any way to improve the performance of a self join of large table? The size of this table is around 150 million records.

My query is something of this sort.

     Select A.*
     ,value 1/ sum(value 2) over (partition by dim1, dim2, dim3, dim3 )
     from
     (
     select
     dim1,
     dim2,
     dim3,
     metric 1/ metric 2 as value 2
     from A
     group by 1,2,3
     ) B
     where A.dim1 = B.dim1
     and A.dim2 = B.dim2
     and A.dim3 = B.dim3

I am using a self join on table A with an OLAP function partition by. The performance is poor and looks like olap functions are not as fast they are supposed to be.


Thanks



     
  <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