Introducing Radical.sh

Forget Code launches a powerful code generator for building API's

DATABASE SIZE AND USAGE in Teradata

To get maximum database size and current usage for a particular database, ForgetCode suggests the simple select query as below.
Users and administrators can act accordingly by watching the spool usage to improve the performance.

Input: Your database name in place of 'YOURDATABASE' .

SELECT 
DATABASENAME,
CAST(SUM(MAXPERM)/(1024*1024*1024) AS DECIMAL(7,2)) MAX_PERM,
CAST(SUM(CURRENTPERM)/(1024*1024*1024) AS DECIMAL(7,2)) CURRENT_PERM,
CAST(SUM(MAXSPOOL)/(1024*1024*1024) AS DECIMAL(7,2)) MAX_SPOOL,
CAST(SUM(CURRENTSPOOL)/(1024*1024*1024) AS DECIMAL(7,2)) CURRENT_SPOOL 
FROM 
DBC.DISKSPACE 
WHERE DATABASENAME = 'YOURDATABASE' 
GROUP BY 
DATABASENAME ORDER BY MAX_PERM DESC;