|
Archives of the TeradataForumMessage Posted: Thu, 05 Feb 2004 @ 21:12:59 GMT
Frank, Just a few thoughts, for what they are worth. I think Query #1 and Query #3 are quite different. The former must draw randomly 10 values out of 400+ million, whereas the latter has to draw 10 values out of only 520 distinct DAY_DT. So, the first task is much more complex and I would expect it might take a bit longer. DAY_DT is a part of the PI (hence, there is some determinism it its distribution with respect to AMPs); this probably does not help the random sampling algorithm in this case either. In Query #2 you use column EDW_JOB_ID. I cannot find any stats on it so it is difficult to even guess how the values of this column are "distributed" across AMPs. Perhaps there is something about it that persuaded the optimizer to use a faster algorithm. It would be useful if you could describe this column in more detail. Regards, Victor
| ||||||||||||||||||||||||||||||||||||||||||||||||
| ||||||||||||||||||||||||||||||||||||||||||||||||
Copyright 2016 - All Rights Reserved | ||||||||||||||||||||||||||||||||||||||||||||||||
Last Modified: 15 Jun 2023 | ||||||||||||||||||||||||||||||||||||||||||||||||