Home Page for the TeradataForum
 

Archives of the TeradataForum

Message Posted: Thu, 05 Feb 2004 @ 21:12:59 GMT


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


Subj:   Re: A weird and unusual circumstance...
 
From:   Victor Sokovin

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



     
  <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