Home Page for the TeradataForum
 

Archives of the TeradataForum

Message Posted: Tue, 24 Aug 2004 @ 07:28:56 GMT


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


Subj:   Re: Different Explain for identical query with different users
 
From:   Victor Sokovin

  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.  



Without knowing more about the data distribution I'd say it's a feature. It probably shows that the statistics you collected are really used by the optimizer. Of course, you might be less happy with some of the explains if they perform worse than you think they should. One could call that a bug or simply the current state of technology.

You still have options: rewrite the query, try to collect more or less stats (yes, less is sometimes better). You should find many examples of this kind in the archives. I am not sure about the figures but I would think that SQL tuning and statistics comprise something like 15-20% of the threads.


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