Home Page for the TeradataForum
 

Archives of the TeradataForum

Message Posted: Mon, 20 Aug 2007 @ 13:59:04 GMT


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


Subj:   Re: Extraneous Columns On GROUP BY
 
From:   Michael Larkins

Raghav:

The only performance impact is that it has to include the extra column values in the hashing process - minimal extra work.

However, if you include a lot of extra columns you will return more rows because of more unique combinations. If you are not seeing all of the values used to establish unique values, the output is likely to be a bit confusing, looking like duplicates. Additionally, if you include too many columns the output will be all or the vast majority of the rows. In this situation where you are seeing all of the rows, it could be much faster to just select all of the rows without the GROUP BY. It all depends on what you are really actually trying to accomplish.


Hope this helps,

Michael Larkins
Certified Teradata Master
Certified Teradata SQL Instructor



     
  <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