Home Page for the TeradataForum
 

Archives of the TeradataForum

Message Posted: Mon, 23 Aug 2004 @ 16:26:24 GMT


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


Subj:   Re: Different Explain for identical query with different users
 
From:   Grupe Roland

Hello,

The SQL looks something like this (the whole thing is too long to post), where xx is usually a view:

     SELECT xx.ARTICLE,
            xx.otherkeys,
            sum(xx.facts)
     FROM
       ( SELECT a.ARTILCE,
                f.otherkeys,
                f.facts,
                d.week_id
         FROM  SecurityTable SEC,
               FactTable f,
               ArticleTable a,
               DayTable d
         WHERE f.ART_NO = a.ART_NO
           AND SEC.DB_USER_ID = user  /* Enter a fixed username here */
           AND SEC.ART_NO = f.ART_NO
           AND d.daydate = f.daydate
       ) xx
     where  xx.somequalifications
     group by factcols

I ran this query with different users and get different explains. I also ran it using the same user and changed the 'user' system variable to different string values.

Again I get different explains, depending upon the string I provide.

The optimizer is obviously taking the actual value into account. I'm just wandering if this is a bug or a feature.


Roland



     
  <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