Home Page for the TeradataForum
 

Archives of the TeradataForum

Message Posted: Fri, 13 Oct 2006 @ 12:28:13 GMT


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


Subj:   Re: How to get the REAL explaination for a query with variable
 
From:   Anomy Anom

<-- Anonymously Posted: Friday, October 13, 2006 08:24 -->

The key is that the optimizer knows there will only be ONE date (that the variable will have only one value) so partition elimination will be worthwhile. It just doesn't know WHICH partition until run-time (dynamic partition elimination).

Out of curiosity, did you try using derived table expression

     SELECT * FROM BIG_TABLE,
      (SELECT MAX(BATCH_TABLE.BATCH_DATE)AS MAXDATE FROM BATCH_TABLE) X
     WHERE BIG_TABLE.CREATED_DATE = X.MAXDATE;


     
  <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