Home Page for the TeradataForum
 

Archives of the TeradataForum

Message Posted: Tue, 13 Nov 2012 @ 09:25:03 GMT


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


Subj:   Re: How to Identify UNUSED STATS on a table?
 
From:   Gorner, Tomas

Sravan Kumar Bodla wrote:

  I am confused with 2 different versions on extra stats/unused stats.  


  Some articles says, "No stats better than wrong stats", & "unused stats doesn't affect the query performance but resources".  


Simply put, "No stats better than wrong stats" refers to stale statistics or eventually a truncated histogram that I mentioned in my last post.

How can stale statistics affect your performance? Well, imagine the optimizer is choosing the execution plan based on stale statistics. It assumes 100 lines in table A, whereas there is 100.000.000. In some step, it can choose to duplicate table A, since it looks like a good idea in case of a 100-rows table. Well, it doesn't have to be such a good idea if the table grew to 100.000.000 rows in the meantime. But how can the optimizer know if you don't tell him by recollecting the statistics?

Unused stats don't affect performance of the queries, that is true. They just sit there being unused and maybe recollected for no reason.


Cheers,

Tomas



     
  <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