Home Page for the TeradataForum

Archives of the TeradataForum

Message Posted: Wed, 05 Jan 2011 @ 16:42:52 GMT

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

Subj:   Re: Copying Statistics from one table to another
From:   Joe Gleason

This will give you most of the stats you are looking for:

     sel 'collect stats on ' || trim(c.databasenamei)  || '.' ||
     trim(b.tvmnamei) || ' column ' || trim(a.fieldname) || ';'
     dbc.tvfields a,
     dbc.tvm b,
     dbc.dbase c
     where a.tableid = b.tvmid
     and b.tablekind = 'T'
     and b.databaseid = c.databaseid
     and upper(trim(c.databasenamei)) in ('dbname')
     and a.fieldstatistics is not null
     order by c.databasename,b.tvmname,a.fieldname

  <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