Home Page for the TeradataForum
 

Archives of the TeradataForum

Message Posted: Sat, 21 Jun 2003 @ 12:46:23 GMT


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


Subj:   Re: Statistics didn't change
 
From:   Glen Blood

Collect statistics on table; Only recollects stats that were previously collected. There is no quick and dirty way to initially collect statistics.

In other words, if you create a table, you must first collect statistics on any index including the primary index) and or column that you need stats on. Then, after the demographics have changed (the only number that I have heard is 10%) you can recollect statistics using just the table syntax.

It is much easier to automatically collect statistics on a named index (grabbing all of the columns in a complicated index is a bit tricky and sometimes blows out the bteq limit of 254 chars/line). So what we have done is:

- Modified our standards to require that all indices be named. I only have one old application that does not follow this standard.

- Collect statistics on all indices and any required columns at table creation. We have built a UNIX script that maintains these statements for copying database schemas without arcmain.

- Built a batch job that recollects statics on the table as required. All I have to give it is part of the database(s) name. The applications run the jobs at the appropriate place in their schedule. This way, as long as they do not drop indices, I can change the statistics in the database definition without ever modifying the script.

Glen



     
  <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