Home Page for the TeradataForum
 
 

 

Archives of the TeradataForum





Message Posted: Wed, 15 Jan 2003 @ 15:19:12 GMT





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




Subj:   Re: Strange Product Join?
 
From:   David Wellman



In this example, the Product join is the type of processing used to perform the comparison. Whether this join used a product join or a merge join wouldn't change the outcome because you have a join criteria included in your sql and in the explain output.

A 'real' product join would have resulted (as you said) in a much larger row count, but a 'real' product join will only happen when you omit the join criteria or when you code a CROSS JOIN in your sql.

Think of it this way. There are join types and join strategies.

A join type is what you code in your sql, it allows you to determine the result of the join for any given set of data.

A join strategy is how the optimiser decides to perform that processing and may NOT be the same as you code.

As in this case, you have coded a perfectly acceptable INNER join, but due to DDL, data volumes etc the optimiser has chosen a product join strategy as the quickest way of producing the correct result.

Dave





     
  <Prev Next>   <<First <Prev Next> Last>>  
 
 
 
 
 
 
 
 
  
 
  Top Home Join Privacy Feedback  
 
 
Copyright for the TeradataForum (TDATA-L), Manta BlueSky 
Last Modified: 30 Jun 2008