There are several specific operations that are considered as long operations.
When performing one of these operations, we can follow the progress of the operation and see statistics about the operation, relevant object, elapsed time, estimated time and more.
These operations are considered as long operations:
- Full table scan
- Fast full index scan
- Hash join
- Sort
- Roolback (since 10g)
To follow the operations you can query v$session_longops view. A row for the opeartion will be in this table several seconds after the operation started.
Use this query to see all running long opeartions:
select sid,
opname,
target,
sofar,
totalwork,
elapsed_seconds,
time_remaining
from v$session_longops
where sofar<>totalwork
Columns:
SID – sid of the operation
OPNAME – operation name (for example: table scan, sort/merge)
TARGET - the relevant object
SOFAR – how much work has been completed
TOTALWORK – how much work in total this operation needs to do
ELAPSED_SECONDS – number of seconds since the operation started
TIME_REMAINING – estimation about number of seconds left







Super post, Need to mark it on Digg
Boldy