How to do it...

The following are the steps for identifying suspect queries:

  1. Connect to the Teradata system using SQLA or Studio.
  2. Execute the following query:
SEL Logdate , Hr (TITLE 'Hour'), Wrkld as WorkloadName, SUM(CPU) as TotalCPU FROM ( SEL logdate , EXTRACT(HOUR FROM LogonDateTime) AS Hr , b.RuleName AS Wrkld ,CASE WHEN TotalIOCount = 0 THEN 0 ELSE ((AMPCPUTime+Parsercputime) * 1000)/TotalIOCount END AS "PJI", CASE WHEN (AMPCPUTime + Parsercputime) =0 THEN 0   ELSE (TotalIOCount) / ((AMPCPUTime + Parsercputime) * 1000) END AS "UII", CASE WHEN ((AMPCPUTime+Parsercputime) / (HASHAMP()+1)) =0 THEN 0 ELSE ( 1 - (AmpCPUTime / (HASHAMP()+1))/NULLIFZERO(MaxAmpCPUTime)) END AS "CPU_skew" , CASE WHEN (TotalIOCount / (HASHAMP()+1)) =0 THEN ...

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.