|
|
Archives of the TeradataForum
Message Posted: Thu, 18 Oct 2001 @ 20:52:43 GMT
Subj: | | Re: Stats always desirable (was Join question) |
|
From: | | John Hall |
Just to add my .04 cents.
Although I've never run into the problem myself, I have heard of some cases in which having statistics caused problems for the
parser/optimizer and removing the statistics resulted in a better work plan. What I would like to do is advocate that when you find
yourself in that situation, then report it as a bug with the expectation that it's to be fixed. There's no legitimate reason why having the
statistics of a column/index should result in a bad workplan - unless it's a bug.
I realize that dropping the offending statistics is the expedient way of getting-on to the next query, but I don't think that it should
be considered much of a fix. After all, without statistics, a random-AMP sample is used and at some point, another AMP will be used for the
random-AMP sample or the demographics of the table is going to change - when either one happens, you can no longer be sure how well your
query is going to run. In addition, not having statistics might improve one query, but what about the other queries against those same
tables? Having statistics upon which you can depend solves those issues and helps guarantees a proper workplan.
Not reporting problems isn't doing anybody a favor and certainly doesn't do anything to improve the Teradata product. If your only work-
around is dropping the statistics, then that has to be done. But please, when you encounter a problem, be aggressive and report it so that
it can be fixed.
| |