Oracle November 29, 2010 0

A very cool dollar view V$SESSION_LONGOPS

V$SESSION_LONGOPS view

This view displays the status of various operations that run for longer than 6 seconds (in absolute time). These operations currently include many backup and recovery functions, statistics gathering, and query execution, and more operations are added for every Oracle release.

To monitor query execution progress, you must be using the cost-based optimizer and you must:

– Set the TIMED_STATISTICS or SQL_TRACE parameter to true

– Gather statistics for your objects with the ANALYZE statement or the DBMS_STATS package.

SQL> SELECT * FROM v$session_longops WHERE SOFAR != TOTALWORK;

Cheers!