Register | Login

Tech Center

Tech Tips

How can you determine skewness in a table using tools such as Teradata Manager and Teradata Administrator?

There are various ways to determine skewness in a table using tools such as Teradata Manager and Teradata Administrator. But as a DBA, we may be interested in looking at a subset of a database or tables. You can use the query below to accomplish this task.

SELECT
DatabaseName,
TableName,
(100 - (CAST(AVG(CurrentPerm) AS DECIMAL(18,2)) /MAX(Currentperm)*100)) AS Skew
FROM DBC.tablesize
WHERE DatabaseName IN ('somedatabasename') AND TableName IN ('sometablename')
GROUP BY DatabaseName, TableName
ORDER BY Databasename, TableName;

View All Tips >
Got a great idea? Share it with your peers!  >


Company Newsroom Site Help Site Map Privacy/Legal Contact Us