Home Page for the TeradataForum

Archives of the TeradataForum

Message Posted: Tue, 22 Sep 2009 @ 11:59:00 GMT

  <Prev Next>   <<First <Prev

Subj:   Re: Tables without statistics
From:   Victor Sokovin

  Here is the sample. You may add dbc.indexstats if you want to know about index.  

     > sel * from dbc.tables
     > where (databasename, tablename) not in (
     > sel databasename, tablename from dbc.ColumnStats
     > where FieldStatistics is not null
     > );

We might need to distinguish cases when histograms are created but stats have not yet been collected (zeroed statistics). This can happen after table creation with the WITH DATA AND STATISTICS clause we are discussing in the parallel thread or when stats have been "collected" on an empty table.

If the OP is interested in this level of detail, parsing the HELP STATISTICS statement may be the way to go. There are also Dieter's scripts visualizing the contents of the stats stored. They can be used to distinguish cases of zeroed or stale stats.



  <Prev Next>   <<First <Prev
  Top Home Privacy Feedback  
Copyright for the TeradataForum (TDATA-L), Manta BlueSky    
Copyright 2016 - All Rights Reserved    
Last Modified: 15 Jun 2023