Home Page for the TeradataForum
 

Archives of the TeradataForum

Message Posted: Wed, 23 Jun 2004 @ 09:31:29 GMT


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


Subj:   Re: Collect stats and Group by difference
 
From:   Panipathi, Vijay

Hi,

Based on the experiment conducted, please see the answers.

Collect stats does not consider unique values if more than 1 column(Primary Index) is having null values, where as group by identifies it as unique values.

Consider table X with following rows.

        A       B       C       D
        1       2       3       5
        1       ?       ?       5
        1       7       3       7
        1       ?       3       6
        1       2       3       6
        1       ?       ?       2
        1       ?       3       7

Group by on A,B,C gives the output as

        A       B       C
        1       2       3
        1       ?       ?
        1       7       3
        1       ?       3

Where as after collecting the stats it displays only 3 unique values.

Hope this helps you..


Regards,

Vijay



     
  <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