Quantcast
Channel: Teradata Forums - Database
Viewing all articles
Browse latest Browse all 14773

Calculating the actual query run time - response (9) by usmans

$
0
0

To find the total time the query spent on the system vs the total time the query was actuallly processed can be found via dbql:

  ( ( a.firstresptime - a.starttime  ) HOUR( 4 )  TO SECOND( 2 )  ) AS ElapsedTime,

  ( ( a.firstresptime - a.firststeptime  ) HOUR( 4 )  TO SECOND( 2 )  ) AS ExecutionTime,

The difference between the above 2 values will give the time the query was in Delay state:

ElapsedTime - ExecutionTime AS DelayTime,

The same value for Delay time is found in DBQL in column "WDDelayTime". 

You can confirm this value by checking it with the value you have calculated as DelayTime.

 

In TD 13.10, the format for "WDDelayTime" is integer so you might have to do some calculations to convert all time to seconds to confirm the values


Viewing all articles
Browse latest Browse all 14773

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>