Home Page for the TeradataForum
 

Archives of the TeradataForum

Message Posted: Sat, 30 Dec 2006 @ 12:02:39 GMT


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


Subj:   Re: How to prevent high skewness between large_tableA join large_tableB
 
From:   Xu, Feng

Hi,

High skewness means that (b1,b2) have a lot of duplicate values.

case 1: If you only use inner join to filter table A's record, why not try the following:

     Select *
     >From  large_tableA     A
     Inner join  (
     select b1,b2
     from large_tableB
     group by 1,2 )   B
     On  A.a1 = B.b1
     And A.a2 = B.b2

case 2: If you want to retrieve Table B's fields other than (b1,b2), the above method doesn't work. but obviously you will face a very large result set.

If table A have 1million records, the rows of the result may be 100 million. Is it really what you want?



     
  <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