Home Page for the TeradataForum

Archives of the TeradataForum

Message Posted: Sat, 21 Jul 2012 @ 14:12:30 GMT

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

Subj:   Re: Difference between GROUP BY and DISTINCT in TD 14.
From:   Dave Wellman


From a number of documents its not quite like that.

For many years/releases in Teradata there have been two algorithms that can be used to perform aggregation. Each algorithm performed better with a certain demographic of data. The GROUP BY (or ARSA) algorithm performed better as the group by columns become more non-unique. The DISTINCT algorithm performed better with more unique group by columns.

Which algorithm was triggered was determined by your code, with DISTINCT being the default for sub-queries if you didn't code anything.

With (I think) TD 13.10 and onwards there are still two algorithms, but the decision as to which one to use is now made by the DBMS based not on your code but on the data. I'm guessing that statistics and/or a sample of the data are used to determine which algorithm will perform better.



Ward Analytics Ltd - Information in motion (www.ward-analytics.com)

  <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: 28 Jun 2020