Quantcast
Channel: Teradata Forums - All forums
Viewing all articles
Browse latest Browse all 27759

Top 10 Databases And Tables According To Size? - response (1) by sachin.sebastian

$
0
0
MAXPERM IS the MAX Permanant space that has been allocated. CURRENTPERM IS the Permanant space occupied currently. So use CURRENTPERM TO calculate space consumed. Use SQL below to find TOP Databases by space occupied: SELECT  DatabaseName ,MAX(CurrentPerm) * (HASHAMP()+1)/1024/1024 AS USEDSPACE_IN_MB FROM DBC.DiskSpace GROUP BY DatabaseName ORDER BY USEDSPACE_IN_MB DESC;  Use SQL below to find TOP Tables by space occupied: SELECT  DATABASENAME ,TABLENAME ,SUM(CurrentPerm)/1024/1024 AS TABLESIZE_IN_MB FROM DBC.TableSize GROUP BY DATABASENAME,TABLENAME ORDER BY TABLESIZE_IN_MB DESC;

Viewing all articles
Browse latest Browse all 27759

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>