|
|
Archives of the TeradataForum
Message Posted: Thu, 26 Jun 2003 @ 15:24:31 GMT
Subj: | | Re: Finding Empty Tables |
|
From: | | Bach, Michael |
Thanks for the feedback
Looking for the same size on each amp seems to work a treat. We have a 192 amp system but looking at tables up to 400k misses plenty -
our biggest empty table is just over 6MB.
By using the SQL below and then checking several of the tables in the output, all comeback with zero rows....result! Seems to work
unless anyone can spot a flaw in the logic?
insert into database.empty_tables??
select
databasename,
tablename,
min(currentperm) as minperm,
max(currentperm) as maxperm,
sum(currentperm) as totalperm
from
dbc.tablesize
having
minperm = maxperm
group by 1,2
;
| |