Search This Blog

Thursday, March 10, 2011

Process execution time

You can use the query to know the exact time taken by the process to complete its run. Handy one!

SELECT PRCSINSTANCE
, PRCSNAME
, OPRID
, RUNCNTLID
, SERVERNAMERUN
, RQSTDTTM
, RUNDTTM
, BEGINDTTM
, ENDDTTM
, floor(TO_CHAR((enddttm-begindttm)*24*60)) AS MINUTES
, lpad(FLOOR(((TO_CHAR((enddttm-begindttm)*24*60))-floor(TO_CHAR((enddttm-begindttm)*24*60)))*60),2,0) AS SECONDS
, decode (FLOOR(TO_CHAR((enddttm-begindttm)*24*60))||':'||lpad(FLOOR(((TO_CHAR((enddttm-begindttm)*24*60))-floor(TO_CHAR((enddttm-begindttm)*24*60)))*60),2,0)
, ':'
,' '
,FLOOR(TO_CHAR((enddttm-begindttm)*24*60))||':'||lpad(FLOOR(((TO_CHAR((enddttm-begindttm)*24*60))-floor(TO_CHAR((enddttm-begindttm)*24*60)))*60),2,0)) AS MINSEC
,RUNSTATUSDESCR
FROM PS_PMN_PRCSLIST
ORDER BY RUNDTTM DESC


Contributed by Arshad Ali

No comments:

Post a Comment

Building Scalable Systems - Handling Hyper-Growth

Hyper-growth is one of the most exhilarating phases for any business, marked by rapid expansion, new opportunities, and an undeniable sense ...