Home Page for the TeradataForum
 

Archives of the TeradataForum

Message Posted: Fri, 12 Oct 2001 @ 14:36:05 GMT


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


Subj:   Re: Stats always desirable (was Join question)
 
From:   Donna Becker

Petr,

It is my experience that -- No -- statistics are not always desirable. In some cases, you follow the general rules and then you "tweek".

1. Collect on the PI and all SIs of all tables.

2. Collect stats on the columns of the smaller tables where the columns are used in joins or other equalities.

3. Collect on columns of large tables used in joins where they have highly uneven distribution

4. Do not let them get stale

From this point I start query analysis, and tuning (and don't forget regression testing).

1. adding removing stats based on what you learn from the explain

2. combining multiple columns with a secondary index and collecting on the index. The optimizer may not use the index, but statistics on the combination of columns gives it the information it needs to make the right choice.

3. You can sometimes get fabulous results using join indexes.

4. Implementing a new table (or other minor forms of denormalizing)

5. The use of derived tables if necessary

The list goes on and on

Donna Becker



     
  <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