Wednesday, May 5, 2021

execution

 select *
from (
select inst_id,sid,serial#,username, sql_id ||' - ' ||sql_child_number "SQLID", decode(vs.sql_id, null,' ',decode(vs.status,'ACTIVE',round((sysdate - SQL_EXEC_START) * 86400,2)) ) "RunTime(Secs)",
(select decode(count(qcsid),0,'N','Y - ' ||(count(qcsid)- 1))
from gV$PX_SESSION a
where sql_id ='aq8yqxyyb40nn' and vs.sid = a.qcsid and a.inst_id = vs.inst_id ) "PRLL"
from gv$session vs, dual
where ( sql_id ='aq8yqxyyb40nn' or PREV_SQL_ID = 'aq8yqxyyb40nn') order by prll desc )
where rownum < 2

No comments:

Post a Comment