Tag: table size in teradata

Query to find Table Space Utilization in Database

This is the query to find the amount of space which each table occupy in there respective Database. SELECT DATABASENAME (TITLE ‘Database’) ,TABLENAME (TITLE ‘Table Name’) ,SUM(CURRENTPERM)/(1024*1024*1024)  (DECIMAL(15,6))  (TITLE ‘Current Perm Space(GB)’) FROM DBC.TABLESIZE WHERE DATABASENAME = ‘YOUR_DATABASE_NAME‘ GROUP BY 1,2 ORDER BY 3 DESC Where ‘YOUR_DATABASE_NAME‘ is the name of the database for which …

Continue reading