Home Page for the TeradataForum
 

Archives of the TeradataForum

Message Posted: Tue, 13 Jul 2004 @ 20:57:55 GMT


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


Subj:   Joining to current month
 
From:   rablum

We run monthly reports based on a period end date. We store all period end dates in a table and show the most current one in a view that you can join to other tables to report only on that period end date. However, when we join to this view, our reports run extremely slowly, as opposed to just hardcoding in the period_end_date (i.e., t1.period_end_date = '2004-05-31' vs. t1.period_end_date = t2.period_end_date).

When we hard code the date, our query only looks at records that have this period_end_date, thus running the query faster. When we use the join to the current period end date view, the query reads every record in every table regardless of period end date and then at the end filters by the current period end date.

Any suggestions on how better to automate reports using a current period or date?


Rachel



     
  <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