Home Page for the TeradataForum

Archives of the TeradataForum

Message Posted: Wed, 06 Apr 2005 @ 22:16:33 GMT

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

Subj:   Re: V2R5.1 dynamic partition elimination
From:   Matthew Winter


Try re-writing the query to the following:

     select a.cal_date, b.txn_id, b.str_nbr, b.register_nbr, b.txn_type,
       from dim_time a
        inner join pos_txn  b
          on  a.per_id = b.per_id
          and a.cal_date between CAST('2005-04-03' AS DATE FORMAT 'YYYY-MM-DD')
                             and CAST('2005-04-04' AS DATE FORMAT 'YYYY-MM-DD')

There is no need for the additional joins from what I can make out and this should at least give the optimiser a fighting chance to perform the partition elimination.

If this does not work could you post the explain plan.



  <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: 28 Jun 2020