All Forums Tools
teramurali 21 posts Joined 11/08
24 Mar 2009
GroupBy and DIstinct

hi, what are the difference between Group by and distinct

mohantera 2 posts Joined 03/08
24 Mar 2009

Hi,The more duplicates you expect to eliminate, the more likely GROUP BY will perform better; conversely, if you expect few duplicates, DISTINCT is likely to be better.DISTINCT, "make a list, then remove duplicates".GROUP BY, "check for matches as you go, before adding to the list".Regardsmohantera@gmail.com

teramurali 21 posts Joined 11/08
29 Apr 2009

GROUP BY sorts the data locally on vprocessor while DISTINCT sorts the data after it is redistributed

rohitbeth 32 posts Joined 10/07
16 Jun 2009

we use group by or distinct only while retrieving data right, can you clarify on 'DISTINCT sorts the data after it is redistributed' - redistribution is used only while loading ?

CarlosAL 512 posts Joined 04/08
17 Jun 2009

I wrote something about this issue (in Spanish) here: http://carlosal.wordpress.com/2009/06/02/distinct-vs-group-by-en-teradata/HTH.Cheers.Carlos.

rohitbeth 32 posts Joined 10/07
17 Jun 2009

Hi carlos,Thanks for the update...if you got an english translation of the same..would be useful....!Rgrds,Rock

You must sign in to leave a comment.