|
Archives of the TeradataForumMessage Posted: Fri, 23 Aug 2002 @ 08:00:07 GMT
Hi, After my last posting, some people gave me advices. I also did further experiments and figured out: * If I didn't collect stats on selection columns, the optimizer seems to choose 10% of total records as default estimated # of rows selected. (The optimizer knows the exact number of total records if I collect stats on PI, or it does random sampling if there is no stats on PI) * If I collect stats on the selection column, the optimizer seems to choose * Even if I select a value which actually exists in the column, somehow the optimizer occasionally falls back to the default. In my test data, with 83 out of 143 different values the optimizer estimates # of selected rows almost accurately, so it seems to use
stats on that column. But with other 60 values, it falls back to the default: Those 60 values seem to be values with small # of records, but not the 60 values with least records. It seems that those values are choosed somewhat randomly (depending on its PI?). I'll be happy if the optimizer will make a bit better guess than Regards. --
| ||||||||||||||||||||||||||||||||||||||||||||||||
| ||||||||||||||||||||||||||||||||||||||||||||||||
Copyright 2016 - All Rights Reserved | ||||||||||||||||||||||||||||||||||||||||||||||||
Last Modified: 15 Jun 2023 | ||||||||||||||||||||||||||||||||||||||||||||||||