feature request: remaining time for long queries

jschmied

Member²
Hi!

It would be nice to know how long a pending query will run.

Example:

SELECT sid,
opname,
target,
trunc(sofar / totalwork * 100, 1),
elapsed_seconds,
time_remaining,
message
FROM v$session_longops t
ORDER BY t.start_time DESC

shows how long a pending operation will take.

Greetings

J
 
you can add long ops like this :

open the session window
click the spanner
click the details tab
click the new button ( top right )
enter "Long Ops" in the caption box
enter the following query on the query box

Code:
SELECT ceil((sofar / decode(totalwork,0,1,totalwork)) * 100) pct_complete,
       time_remaining,
       elapsed_seconds,
       message,
       start_time,
       last_update_time
FROM v$session_longops
WHERE sid = :sid
      AND serial# = :serial#
ORDER BY start_time DESC
click ok.

You will get a new tab that lists the long ops for a session. put the session window in auto refresh and watch your database work.

what would be cool is something that would take a percent column and turn it into a percent complete progress bar.
 
Back
Top