cancel
Showing results for
Did you mean:
Highlighted

## How to create a report showing the average time of queue job before start.

Hi,

Does anyone know of it is possible to generate a report on the duration of a job stays on queue before it start?

Regards,

Aris.

1 Solution

Accepted Solutions
Highlighted
Accepted Solution!

## Hi, Here you go. I've only

Hi,

Here you go. I've only added the columns for Id, queued time, start time, end time, and time in queue. You can add what else you require.

select
nom_nbjob.jobid "Job ID",
UTCBigIntToNomTime(nom_nbjob.starttime) "Queued Time",
UTCBigIntToNomTime(nom_nbjob.activestarttime) as "Start Time",
UTCBigIntToNomTime(nom_nbjob.endtime) "End Time",
DATEDIFF(second,UTCBigIntToNomTime(nom_nbjob.starttime),UTCBigIntToNomTime(nom_nbjob.activestarttime)) as "Time Que"
from
nom_nbjob

5 Replies
Highlighted
Accepted Solution!

## Hi, Here you go. I've only

Hi,

Here you go. I've only added the columns for Id, queued time, start time, end time, and time in queue. You can add what else you require.

select
nom_nbjob.jobid "Job ID",
UTCBigIntToNomTime(nom_nbjob.starttime) "Queued Time",
UTCBigIntToNomTime(nom_nbjob.activestarttime) as "Start Time",
UTCBigIntToNomTime(nom_nbjob.endtime) "End Time",
DATEDIFF(second,UTCBigIntToNomTime(nom_nbjob.starttime),UTCBigIntToNomTime(nom_nbjob.activestarttime)) as "Time Que"
from
nom_nbjob

Highlighted

## Hi Riaan, You're the man

Hi Riaan,

You're the man bro.

It works like a charm.

I made some changes to get the information i need for the past 1 month.

Thanks a lot!

cheers

Highlighted

## Cool, If you figure out how

Cool,

If you figure out how to change the seconds in to hh:mm:ss then let me know. Still learning sql.

Highlighted

## "Still learning SQL" -

"Still learning SQL" - Really?  Impressive SQL scripts so far

Keep learning because I like what I see!

I currenlty have 7 of your Custom Scripts running in my OpsCenter Analytics Servers.

Highlighted