Home Page for the TeradataForum
 

Archives of the TeradataForum

Message Posted: Wed, 13 Sep 2006 @ 19:38:12 GMT


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


Subj:   Re: Which method is faster?
 
From:   Anomy Anom

<-- Anonymously Posted: Wednesday, September 13, 2006 15:04 -->

Question:

Is selecting data using the distinct clause faster than using a group by clause?


Answer:

Please run explain against each SQL and you will see how the system process either SQL.

Distinct is more costly in TERADATA in spool space. Group by is less costly in spool space. Depend on size of the table, the performance may be equal or better for group by. Distinct is done at PEP level and group by is done mostly at Bynet (ynet) level. This may be changing at V2R6 or higher. You need to check it out in your environment.



     
  <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