|
Archives of the TeradataForumMessage Posted: Fri, 11 Feb 2005 @ 17:14:02 GMT
Brian Jones wrote:
For columns with equal distribution (for skewed distribution it's hard to say): - Distinct spools and redistibutes all rows, then eliminates duplicate rows -> efficient if the number of rows per value per AMP is low - Group by eliminates duplicate rows in the first step locally, then redistributes the result sets and eliminates duplicate rows a second time -> efficient if the nuber of rows per value per AMP is high - If PI-columns are aggregated ("computed locally" in explain) then Group By is always more efficient. - And don't forget that a subquery is automatically distinct, but using Group By overrides that. Dieter
| |||||||||||||||||||||||||||||||||||||||||||||||||||
| |||||||||||||||||||||||||||||||||||||||||||||||||||
Copyright 2016 - All Rights Reserved | |||||||||||||||||||||||||||||||||||||||||||||||||||
Last Modified: 15 Jun 2023 | |||||||||||||||||||||||||||||||||||||||||||||||||||