Home Page for the TeradataForum
 

Archives of the TeradataForum

Message Posted: Wed, 05 Nov 2003 @ 17:09:15 GMT


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


Subj:   Re: Count of Distinct Rows
 
From:   David Wellman

Although I think that you've found a bug remember that when the optimiser decides whether or not to "duplicate" or "redistribute" a table is more likely to be based on the estimated number of rows and NOT on the number of unique values.

As I said, I agree with you that I think there's a bug if the "unique values" is one in these cases, the number of rows on the table is held as a different number in the statistics field. To check this, on a table where you've got this anomaly (or feature depending on how you want to treat it) and you've got stats collected, explain a "select * from ..." and make sure there is no WHERE clause. the estimated row count in the spool file should be the number of table rows currently held in the statistics field.


Cheers,

Dave



     
  <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