Home Page for the TeradataForum
 

Archives of the TeradataForum

Message Posted: Mon, 19 Jan 2004 @ 13:52:30 GMT


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


Subj:   Re: Query Optimization with Inner Joins
 
From:   Geoffrey Rommel

  Can someone help me out in optimizing a select query which inner joins two table one big and another small?  


  Table y has primary index on a,b,e,f,g,h ...  


  I am joining on a and b column.  



Your EXPLAIN text shows "no confidence" and "low confidence", which means you need statistics. Change the primary index on table y (the little one) to (a,b). It may be a little skewed, but don't worry about that. Collect statistics on ALL columns and indexes in that table; collect them on all indexes and join columns in the larger one. Then test again. This should make a difference.



     
  <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