Home Page for the TeradataForum
 

Archives of the TeradataForum

Message Posted: Thu, 09 Feb 2006 @ 09:52:49 GMT


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


Subj:   Re: Optimizer won't use PPI
 
From:   Howard Bradley

Try creating my_dates as a view with "hard coded" dates.

     create VIEW my_dates
     (
     beg_of_month
     ,end_of_month
     )
     AS
     SELECT
     '2006-01-01'
      (DATE)
     ,'2006-01-31'
      (DATE)

If you then look at the explain of your query, Teradata substitutes the values as if you had hard coded them and uses the PPI.

     2) Next, we do an all-AMPs RETRIEVE step from a single partition of
        REALLY_BIG_TABLE with a condition of (
        "(REALLY_BIG_TABLE.TABLE_DATE <= DATE '2006-01-31') AND
        (REALLY_BIG_TABLE.TABLE_DATE >=
        DATE '2006-01-01')") into Spool 1 (group_amps), which is built
        locally on the AMPs.  The input table will not be cached in memory,


     
  <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