Home Page for the TeradataForum
 

Archives of the TeradataForum

Message Posted: Fri, 31 Jan 2003 @ 11:00:49 GMT


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


Subj:   Re: Query optimization: difference between inner join and derived table?
 
From:   Paul Johnson

Dave is right, as ever, but at a higher level than the mechanics involved, the queries are different in the question that is being asked.

The first will preserve the 1:1, 1:many, many:1 or many:many relationship between the two tables. The size of the result set depends on this relationship.

The second compares table 1 values to a distinct list of values in table 2 via a subquery. This is a constraint check on table 1 rather than a join between relations. The answer set can only be as large (or smaller) as the number of rows in table 1.

Paul Johnson.



     
  <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