Home Page for the TeradataForum
 
 

 

Archives of the TeradataForum





Message Posted: Fri, 08 Apr 2005 @ 14:34:58 GMT





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




Subj:   Re: Biggest table in DB
 
From:   Ferry, Craig



You can run this query. Obviously it is going to return all tables, so you may want to run in SQL Assistant to cancel after x rows, or set a return limit.

     SELECT DatabaseName,
     tablename,
     CAST((sum(currentperm))/1024/1024/1024 AS DECIMAL(10,2)) AS
     Table_Size_In_GB
     FROM dbc.tablesize
     GROUP BY 1,2
     ORDER BY 3 desc

Craig

________________________________

Craig Ferry
Sr Database Administrator
WESCO Distribution, Inc.





     
  <Prev Next>   <<First <Prev Next> Last>>  
 
 
 
 
 
 
 
 
  
 
  Top Home Join Privacy Feedback  
 
 
Copyright for the TeradataForum (TDATA-L), Manta BlueSky 
Last Modified: 30 Jun 2008