Home Page for the TeradataForum

Archives of the TeradataForum

Message Posted: Wed, 06 Apr 2005 @ 17:28:14 GMT

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

Subj:   Re: Count of all rows, all tables
From:   Stover, Terry

Teradata does not store row counts in any system database tables (unless someone has come up with a way to deduce row count estimates from collected statistics). You have to set up a process to log row counts periodically. I find tracking row counts is more useful than space for managing growth since space changes depending on nusi's and compression. If you are trying to see who's taking up your space you can can get table size from dbc.tablesize.

     SELECT t.databasename, t.tablename, t.creatorname, t.createtimestamp,
            t.lastaltertimestamp, sum(ts.currentperm) currentperm

     FROM dbc.tables t, dbc.tablesize ts

     WHERE t.databasename = ts.databasename
       and t.tablename = ts.tablename
       and t.tablekind = 'T'
       and t.databasename = 'dw_data'

     GROUP BY 1,2,3,4,5

  <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: 28 Jun 2020