Home Page for the TeradataForum
 

Archives of the TeradataForum

Message Posted: Mon, 25 Sep 2006 @ 21:05:07 GMT


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


Subj:   Re: Statistics expert needed
 
From:   Barner Eric

If there are only a few tables Use the Help statistics , and copy the columns into excel or other text editor.

E.g. HELP STATISTICS DATABASENAME.TABLENAME;

(Manual Labor);

BUT THAT DOES NOT DISCERN the difference between column stats and index stats I believe (Corrections anyone?)

Or .... Better to Use the dbc.indexstats & dbc.columnstats views.

IF you have NAMED indices you can use the following to generate SQL.

     select
     distinct
     'collect statistics on '||trim(databasename)||'.'||trim(tablename)
     ||' index '|| IndexName || ';'
     from dbc.indexstats
     where databasename = 'Databasename'
     and tablename = 'Tablename';

If you didn't name your indices like nusi1 or upk1 or whatever, you will not be able to collect the stats.

I don't have time to figure out the how to use dbc.columnstats right now. With that strange Varbyte(16383) from the TVFields table and all...

Any masters or Experts out there have the SQL generation code for that??

It would be much appreciated.



     
  <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