query for getting elapsed time

Database
MBR
Enthusiast

query for getting elapsed time

Hi,

i want to retrieve query elapsed time how can i get this if anyone knows pls tell me..Thanks

Regards

5 REPLIES
Enthusiast

Re: query for getting elapsed time

Hi,

check dbql logs.

you can start at sel * from dbc.qrylog;

HTH

Highlighted
Enthusiast

Re: query for getting elapsed time

Hi MBR,

May be you can find more informaion in the following link-

http://forums.teradata.com/forum/database/calculating-the-actual-query-run-time#comment-26312

and also let us know if you find anything new or more

Thanks,

R.Rajeev

MBR
Enthusiast

Re: query for getting elapsed time

Hi all

Thanks for replying

its working fine...

Regards

Re: query for getting elapsed time

SELECT 
( firstresptime - StartTime HOUR(2)  TO SECOND(2) ) AS Elapsedtime
FROM dbc.qrylog WHERE username='XXXXX';

The Above Query will help you to find Elapsed Time.

Enthusiast

Re: query for getting elapsed time

Rajgopal, 

The above query will give you the total time the query spent on the system (including active time and delay time). If you want to calculate the total Active Execution Time of the query on the system (this will not include the time it spent in the delay state), you can use:

SELECT

   ( ( firstresptime - firststeptime  ) HOUR( 4 )  TO SECOND( 2 )  ) AS ExecutionTime
FROM dbc.qrylog WHERE username='XXXXX';