  |  
  |  
 
Archives of the TeradataForum 
 
 
Message Posted: Tue, 06 Nov 2012 @ 17:11:46 GMT 
 
  
 
 
 
 
  
|  Subj:  |   |  Re: How DISTINCT and GROUP BY have same performance in TD 14  |   
|     |   
|  From:  |   |  Anomy Anom  |   
  
 
 
  
< -- Anonymously Posted: Tuesday, November 06, 2012 11:27 -- > 
In TD12 and earlier, DISTINCT used a sort / remove duplicates step at the end while the logically equivalent GROUP BY used an aggregation
step. 
In TD13.0 and later, the optimizer can essentially rewrite DISTINCT as GROUP BY (or in limited cases, vice versa) when the cost estimate
indicates the other method will perform better. 
 
 
 
 
   
 
 |   |