|
|
Archives of the TeradataForum
Message Posted: Tue, 24 Aug 2004 @ 07:28:56 GMT
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
| |