Home Page for the TeradataForum
 

Archives of the TeradataForum

Message Posted: Fri, 13 Jun 2003 @ 20:42:09 GMT


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


Subj:   Re: PPI's & hard-coded predicates
 
From:   Stubbs, Donald

If you could write the queries to use views, and if automated view maintenance is not an issue, you could try the following sql to create the views with the dates in them:

for example a:

select 'replace view database.viewname as  Sel * from table1 where
txn_dte
between ' ||
      trim(min(dte1)) || ' and ' || trim(max(dte1)) || ' ;'
  from controltable;

for example b:

select 'replace view database.viewname as  Sel * from table1 where
txn_dte
between ' ||
      trim(controltable.startdte) || ' and ' ||
trim(controltable.enddate) || ' ;'
  from controltable;

From what I hear and read, in V2R5.1, the optimizer will utilize PPI in many join cases(I read one of the DRs and must admit I had not come close to considering all the ones listed), and the two you provided look to me like they should work.



     
  <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