Home Page for the TeradataForum
 

Archives of the TeradataForum

Message Posted: Wed, 15 Jun 2005 @ 11:00:06 GMT


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


Subj:   Re: Partition elimination using Date function
 
From:   Ole Dunweber

Anomy Anom wrote:

  I am comparing a Date function with partitioning column of a table. But it goes for all partitions scan instead of partition elimination and it takes lot of time to complete the query.  


A work around which works in 5.1.2 (and from 5.1 I would think):

Use a date lookup-table, say Lt_Day, join t22 to this table, and use the date-condition on this table. This ought to give a product join using DPE:

     select *
       from t22 as PPI_table,
            Lt_Day as Lt_table
      where t22.b = Lt_Day.DayId
        and Lt_Day.DayId BEETWEEN date - 20 and date

By the way, I notice that t22 does not include the partitioning column in the primary index. I would not recommend that.


Regards,

Ole Dunweber
Coop Nordic



     
  <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