Wednesday, August 8, 2012

How to check for table size in Teradata


How to check for table size in Teradata


The folllowing queries are used to check for tablesize in Teradata 

How can you find the Table Space Size of your table across all AMPs ?
 
SELECT DATABASENAME, TABLENAME, SUM(CURRENTPERM)
FROM DBC.TABLESIZE
WHERE DATABASENAME = '<DATABASE_NAME>'
AND TABLENAME = '<TABLE_NAME>'
GROUP BY DATABASENAME , TABLENAME;


Following query will give the space consumed on each AMP by the Table

SELECT DATABASENAME, TABLENAME, CURRENTPERM
FROM DBC.TABLESIZE
WHERE DATABASENAME = ‘<DATABASE_NAME>'
AND TABLENAME = '<TABLE_NAME> ';

No comments:

Post a Comment

Thank you :
- kareem