Home Page for the TeradataForum

Archives of the TeradataForum

Message Posted: Fri, 11 Feb 2005 @ 19:33:50 GMT

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

Subj:   Re: Guidelines for using Distinct vs. group by
From:   Dieter Noeth

Bob Duell wrote:

  I'm sure I'm missing something. Are you saying all subqueries have an implicit "distinct"?  

Yes, unless the optimizer knows about uniqueness (unique/PK column or Union in subquery) there's an implict distinct.

Another case without distinct was described by Michael Larkins:

If the subquery is on NUPI column[s], the optimizer will probably choose an "inclusion merge join" and join only to the first occurance of a value.

Just Explain subqueries...


  <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