Liron Amitzi Oracle ACE

Oded Raz Oracle ACE Director

Monitoring Long Operations

Posted by Liron Amitzi on Feb 2nd, 2010 and filed under Oracle, Oracle - Latest Articles, Tips & Tricks. You can follow any responses to this entry through the RSS 2.0. You can leave a response or trackback to this entry

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

1 Response for “Monitoring Long Operations”

  1. Boldy says:

    Super post, Need to mark it on Digg
    Boldy

Leave a Reply

Security Code:

Log in / Advanced NewsPaper by Gabfire Themes