Home Page for the TeradataForum

Archives of the TeradataForum

Message Posted: Tue, 13 Dec 2011 @ 07:48:02 GMT

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

Subj:   Re: Tables which don't have stats
From:   Gupta, Vipin

Hi Sarvan,

I believe following query can be used to determine tables which don't have any stats collected:

     sel trim(d.databasename)||'.'||trim(t.tvmname) (title'table') from dbc.tvm t, dbc.dbase d
     where t.databaseid = d.databaseid and t.tablekind ='T'
     sel trim(d.databasename)||'.'||trim(t.tvmname)
     from dbc.indexes i, dbc.tvm t, dbc.dbase d where i.indexstatistics is not null and
     i.tableid = t.tvmid and i.databaseid = d.databaseid and t.tablekind ='T'
     sel trim(d.databasename)||'.'||trim(t.tvmname)
     from dbc.tvfields f, dbc.tvm t, dbc.dbase d where f.fieldstatistics is not null and
     f.tableid = t.tvmid and f.databaseid = d.databaseid and t.tablekind ='T'
     ) order by 1


Vipin Gupta

  <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