Home Page for the TeradataForum
 

Archives of the TeradataForum

Message Posted: Fri, 05 Aug 2005 @ 08:13:30 GMT


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


Subj:   Re: Optimizer and Transitive Property of Equality
 
From:   Victor Sokovin

          > SELECT  a14.PromoID (NAMED PromoID ) ,
          >          ETC
          > FROM    PRODMSIVws.STORE_SKU_DAILY_PROMO_SALESv a11 ,
          >       PRODMSIVws.LOCATION_Dimensionv a12 ,
          >       PRODMSIVws.ITEM_Dimensionv a13 ,
          >       PRODMSIVws.FACT_PROMOTION_STORE_SKU a14 ,
          >       PRODMSIVws.PROMOTION_Dimensionv a15
          > WHERE      a11.LocID = a12.LocID
          >         AND     a11.ItemID = a13.ItemID
          >         AND     a11.PromoID = a14.PromoID
          >         AND     a12.LocID = a14.LocID
          >         AND     a13.ItemID = a14.ItemID
          >         AND     a14.PromoID = a15.PromoID
          >         AND     a13.ItemID = 1021017
          >         AND     a14.PromoID > 0
          >         AND     a12.corpid  IN ( 1 )
          >         AND     a13.Family_ID  IN ( 1, 10 )
          > GROUP   BY a14.PromoID , etc.

To my knowledge TD transitive closure rules have never been clearly described. It might have to do with trade secrets or whatever. So, some tweaking of a "strange" query could be necessary to see what exactly fails in the closure.

I would be interested to see whether changing this group of conditions will make any difference:

          >         AND     a14.PromoID > 0
          >         AND     a12.corpid  IN ( 1 )
          >         AND     a13.Family_ID  IN ( 1, 10 ) =

Try to make them equalities. If the query becomes as fast as you expect it then relax the conditions one by one until you find the true reason of the problem here.

The rest of the query looks just fine for the transitive closure to be used. But inequalities and (hidden) OR conditions - less certainty there.

Out of interest ... Which tense is mainly used in the article you are referring to? Present or future? If future, then it is a technical article about some *future* release. If present, it is just a marketing article.


Regards,

Victor



     
  <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