|
|
Archives of the TeradataForum
Message Posted: Wed, 06 Apr 2005 @ 17:28:14 GMT
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
| |