Couldn’t find the long running SQL under v$session_longops

oracleperformancequery-performance

I have following SQL running from a long time. I couldn't see the status When I tried to look the time remaining for the query to complete. Can someone explain me why I couldn't find the SQL status

insert into SCOTT.EMP select * from SCOTT.EMP@dblink;

Query used:
SELECT USERNAME, sid, SERIAL#, OPNAME, to_char(start_time,'hh24:mi:ss') stime,
message,( sofar/totalwork)* 100 percent
FROM v$session_longops
WHERE sofar/totalwork < 1;

Thanks in advance!

Best Answer

The best view (for me) to see the status of a long query is V$SQL_MONITOR. This view include all query that has consumed at least 5 seconds of CPU or I/O time. This view is very volatile, so you have to answer it faster after it's execution. If you can't find it into this view, you can find it in a awr report