oracle find long running queries code example
Example: oracle list of long running queries
SELECT SID, to_char(START_TIME, 'hh24:mi:ss') STIME, MESSAGE, (SOFAR / TOTALWORK) * 100 PERCENT
FROM V$SESSION_LONGOPS
WHERE SOFAR / TOTALWORK < 1;
SELECT SID, to_char(START_TIME, 'hh24:mi:ss') STIME, MESSAGE, (SOFAR / TOTALWORK) * 100 PERCENT
FROM V$SESSION_LONGOPS
WHERE SOFAR / TOTALWORK < 1;