Query to find Table Space in Teradata

The below query helps you to identify the total space occupied by the tables in teradata system.

SELECT databasename,
tablename,
SUM (currentperm)/1024**3 AS current_GB
FROM dbc.allspace
WHERE tablename IN ('TableName')
AND databasename = 'DatabaseName'
GROUP BY 1,2
ORDER BY 1,2;

The above query will return 3 columns namely , database name , table name and amount of space table used in teradata system.

Comments

HTML/JAVASCRIPT

Popular posts from this blog

Teradata SQL Assistant Shortcuts

How to List All Tables in Oracle, MySql, Teradata, DB2 and PostgreSQL

7473 Requested sample is larger than table rows. All rows returned