Home Page for the TeradataForum
 

Archives of the TeradataForum

Message Posted: Fri, 12 Oct 2001 @ 16:03:45 GMT


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


Subj:   Re: Stats always desirable (was Join question)
 
From:   Richard K. Sumner

Peter,

Either one of two things is true. Either you have not collected all the statistics that should be collected or you have an error with the system that should be reported to the GSC.

In the first case, since you say that statistics were collected on the join column name DWE_Date with a rather uneven distribution, you don't elaborate on whether you collected statistics on the one-row table and, if there were columns in the predicate, did you collect statistics on them too? If you did not collect stats on all of the columns, you have mislead the optimizer by only telling it half the story (Sorry, I'm not trying to be anal about this but that is just the way that it works). The purpose of statistics is to tell the optimizer about the uneven distribution that you mention - unevenness that it could never know from a random sample, so that it can make intelligent choices as to the join plan. Can you give us more information about the the query and where all the statistics were collected?

If this is an instance of the second case and the optimizer is clearly creating a bad plan when all stats are collected so that it knows all facts about the data then you definitely have an incident for the GSC. And, while the GSC is working on that, you can drop the statistics that you collected and go back to your better performance.

Best of luck,

Rick Sumner



     
  <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