Check table size across all AMPs in Teradata

Table Size in GB:

SELECT DATABASENAME, TABLENAME, CAST(SUM(CURRENTPERM) /1024/1024/1024 as DECIMAL (6,0)) as MaxPerm_GB

FROM DBC.TABLESIZE

WHERE DATABASENAME = '<database>' AND TABLENAME = '<table>'

GROUP BY DATABASENAME , TABLENAME;

 

Table Size in MB:

SELECT DATABASENAME, TABLENAME, CAST(SUM(CURRENTPERM) /1024/1024 as DECIMAL (6,0)) as MaxPerm_MB

FROM DBC.TABLESIZE

WHERE DATABASENAME = '<database>' AND TABLENAME = '<table>'

GROUP BY DATABASENAME , TABLENAME;

Comments