Home Page for the TeradataForum
 

Archives of the TeradataForum

Message Posted: Wed, 21 Jan 2004 @ 21:03:14 GMT


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


Subj:   Re: Statistics and explain plans
 
From:   Victor Sokovin

Craig,

  I do have statistics on this join built by the following SQLs.  


  COLLECT STATISTICS dss_tables.po_header_tbl
INDEX ( branch_id ,sequence_no ,date_transaction );
 


  AND  


  COLLECT STATISTICS ON dss_tables.po_detail_tbl
INDEX ( branch_id ,sequence_no ,date_transaction);
 


  I do use a view to access both tables because I don't want anyone to access the tables directly.  



I had a look at the explain plan and I was wondering where the following condition comes from:

("(sequence_no = SEQUENCE_NO) AND ((branch_id = BRANCH_ID) AND
((sequence_no = SEQUENCE_NO) AND ((purchase_ord_no
= PURCHASE_ORD_NO) AND (branch_id = BRANCH_ID ))))") (in Step 15).


PURCHASE_ORD_NO is mentioned in some other conditions as well. It must be coming from some of the base tables but it is nor clear from the query. How do your views look like?


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