Listing table sizes in Teradata is done by querying the all AllSpace view in the DBC database:
SELECT DatabaseName, TableName, SUM(CurrentPerm) / 1024**3 AS CurrentPermGB, SUM(PeakPerm) / 1024**3 AS PeakPermGB FROM DBC.AllSpace WHERE TableName <> 'All' AND DatabaseName = 'yourDbNameGoesHere' GROUP BY DatabaseName, TableName ORDER BY DatabaseName, TableName ;
‘All’ represents an aggregated row for the whole database. Therefore it’s being excluded.
Leave a Reply