How to do it...

  1. Connect to Teradata using SQLA or Studio.
  2. Find the size of tables in the system using the following query. The output will contain databasename, tablename, and the size of the table with skew; it can be seen in the following code:
/*Find table size*/SELECT  B.databasename , B.TableName , SUM ( currentperm ) ( NAMED CurrentPerm ) ,MAXIMUM ( currentperm ) ( NAMED MaxPerm ) , AVG ( currentperm ) ( NAMED AvgPerm ) ,( ( MAXIMUM ( currentperm ) - AVG ( currentperm )  ) * 100.0  ) / ( MAXIMUM ( currentperm )  ) ( NAMED SkewPercent ) 
FROM    dbc.tablesize B INNER JOIN DBC.TABLES A 
    ON  A.DATABASENAME = B.DATABASENAME 
    AND A.TABLENAME = B.TABLENAME 
GROUP   BY 1 , 2 
ORDER   BY 1 , 2 ;

Following is the output of the query.

  1. Based on the size of ...

Get Teradata Cookbook now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.