Home Page for the TeradataForum
 

Archives of the TeradataForum

Message Posted: Thu, 26 Jun 2003 @ 19:07:50 GMT


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


Subj:   Re: Finding Empty Tables
 
From:   Dieter N�th

Bach, Michael wrote:

  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
;
 



If you had less AMPs (just a few on a development system) and almost perfectly distributed tables then maybe there'll be some errors...

So i'd just add a condition:

and maxperm <= 2**16


The maximum size of a table header is currently 64KB, but AFAIK this will be changed in future releases


Dieter



     
  <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