Home Page for the TeradataForum
 

Archives of the TeradataForum

Message Posted: Wed, 01 Dec 2004 @ 18:17:36 GMT


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


Subj:   Re: ("1=1") condition in the explain plan
 
From:   Victor Sokovin

  Sometimes in the explain plan of some SQL we see ("1=1") condition when it is doing the product join. We do not see this condition in all product joins.  


  I will appreciate if somebody explains me in what circumstances optimizer uses ("1=1") condition?  


  Having this condition in the explain is bad?  



I don't know when exactly the optimizer puts the ("1=1") condition in the plan (that's probably the idiosyncrasies of the code) but I believe it makes no difference to the product join. It is always the same product join. To have it in the explain is not necessarily a bad thing as it is one of the normal tools the optimizer may use. The only thing you should check is that the smaller tables get redistributed. Usually it is (much) better. In some rare cases, though, the redistribution of the larger tables cannot be avoided, and it can still be the best strategy. Anyway, product joins on the explain plan are not a reason for any panic.


Regards,

Victor



     
  <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