- Connect to Teradata using SQLA or Studio.
- 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.
- Based on the size of ...