Home Page for the TeradataForum
 

Archives of the TeradataForum

Message Posted: Thu, 22 Jan 2004 @ 22:34:15 GMT


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


Subj:   Re: Misunderstanding of join index
 
From:   Victor Sokovin

  Does anybody can explain why a SELECT with a COUNT(FIELD_1) or COUNT (DISTINCT FIELD_1) statement does not use the JI? I understand why we can't create a JI with COUNT DISTINCT but I can't figure out for the SELECT statement. In my mind, the JI have the information to return the COUNT information.  



I assume you are referring to the same example as in the original posting? If so, COUNT(FIELD_1) cannot be calculated on the JI because the aggregation on FIELD_1 had already been done and the original level of granularity is lost. COUNT(DISTINCT FIELD_1) could potentially be calculated on the JI. Perhaps you could experiment with statistics?


Victor



     
  <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: 27 Dec 2016