Tuesday, 7 August 2007

V$SESSION_LONGOPS

have a look at the V$SESSION_LONGOPS view when running long running SQL. It shows (among other things) the work the SQL has done and the amount of work it still needs to do to complete the job.

e.g.

SELECT ROUND(((totalwork-sofar)/totalwork)*100) perc,vlo.*

FROM v$session_longops vlo

Where totalwork-sofar > 0

AND start_time > Trunc(Sysdate)

Order By sid,start_time Asc;

No comments: