How to find disk space used by a table.

Database

How to find disk space used by a table.

Hi ,

I would like to know the disk space used by a table.

I am loading a 500MB file as a sample and would like to know the disk space teradata will use. This is a part of scaling later, where I intend to load a 20Gig file.

Thanks in advance.

Best Rgds
Nick
3 REPLIES

Re: How to find disk space used by a table.

SELECT SUM(CURRENTPERM) ACTUALSPACE, MAX(CURRENTPERM)*(HASHAMP()+1) EFFECTIVESPACE
FROM DBC.TABLESIZE
WHERE DATABASENAME = 'mydb' AND TABLENAME = 'mytable'
;

Re: How to find disk space used by a table.

This should give the space in MB.

SELECT SUM(CURRENTPERM)/(1024*1024) ACTUALSPACE, (MAX(CURRENTPERM)*(HASHAMP()+1))/(1024*1024) EFFECTIVESPACE
FROM DBC.TABLESIZE
WHERE DATABASENAME = 'DB_NAME' AND TABLENAME = 'TABLE_NAME'
;

Re: How to find disk space used by a table.

Hi joedsilva

I am new to teradata,  recently shfted to teradata.

can any one give the differnces between TERADATA and OTHER RELATIONAL DBMS. i am in bit confusion.