Home Page for the TeradataForum
 

Archives of the TeradataForum

Message Posted: Tue, 21 Jun 2011 @ 13:54:03 GMT


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


Subj:   Re: Distinct vs. group by in TD 13 onwards
 
From:   Dieter Noeth

On the TD13 demo both version show the same plan, single-AMP aggregation, but adding that additional retrieve step :-(

Explanation
--------------------------------------------------
 
  1)First, we do a single-AMP SUM step to aggregate from au.trans by way of the primary index "au.trans.ACCOUNT_NUMBER = 1" with no residual conditions, grouping by field1 ( au.trans.ACCOUNT_NUMBER). Aggregate Intermediate Results are computed locally, then placed in Spool 3. The size of Spool 3 is estimated with high confidence to be 1 row (21 bytes). The estimated time for this step is 0.02 seconds.  
  2)Next, we do a single-AMP RETRIEVE step from Spool 3 (Last Use) by way of the hash value of "au.trans.ACCOUNT_NUMBER = 1" into Spool 1 (group_amps), which is built locally on that AMP. The size of Spool 1 is estimated with high confidence to be 1 row (25 bytes). The estimated time for this step is 0.02 seconds.  



     
  <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