Need Long Operation in Session Window !

0) Click Tools | Sessions...
1) Click on the little wrench icon
2) Click on the New Post-It note icon
3) Enter LongOps in the Caption field
4) Copy the code below in the Query field
5) Click OK
6) Select the LongOps tab
7) Bob's your uncle

BOB'S YOUR UNCLE
All you have to do is one simple action and Bob's your uncle! You have attained something very easily. Just like Arthur Balfour did in 1886.

Brewer's Dictionary of Phrase and Fable says the nephew was A.J.Balfour and the post in question was Chief Secretary for Ireland. Since Uncle Bob had previously appointed him as

(1) President of the Local Government Board, and
(2) Secretary for Scotland

this third posting lead some uncharitable souls to mutter darkly about nepotism. The uncle in question was the Prime Minister Lord Robert Marquis of Salisbury.

Many considered the appointment was not made on merit but because "Bob was his uncle". He was the nephew of Lord Salisbury, whose Christian name was Robert, or Bob for short.

In fact, Mr Balfour proved a formidable politician and later became Prime minister himself.
 
1. ok, but i have oracle 8i =( and dont have interval function -> "numtodsinterval"
2. Please talk me how i can put Plan Tab on Session window like Toad Session Window ?
 
Try this one. Not as fancy, but should work OK on 8.

Code:
SELECT TRIM(slo.opname) operation_name
      ,TRIM(slo.target || ' ' || slo.target_desc) target_name
      ,slo.totalwork || ' - ' || slo.sofar || ' = ' ||
       (slo.totalwork - slo.sofar) || ' ' || TRIM(slo.units) units_left
      ,(slo.elapsed_seconds + slo.time_remaining) || ' - ' || slo.elapsed_seconds || ' = ' ||
       slo.time_remaining || ' seconds' time_left
      ,slo.last_update_time last_update_date
      ,slo.start_time start_time
FROM   v$session_longops slo
WHERE  slo.sid = :sid AND slo.serial# = :serial# AND
       ((slo.totalwork - slo.sofar) <> 0 OR
       slo.start_time > (SYSDATE - 2))
ORDER BY (slo.totalwork - slo.sofar) DESC
See Chris' reply for the explain plan. His mail with examples is really worthwhile to look at. I am using most of them, with minor cosmetic tweaks.

Chris, you mentioned once, that you still had a few bugs in some of them. Are they all fixed now?
 
Originally posted by Christo Kutrovsky:
I believed I have resolved all issues with the explain plan queries. They are 9i only thow.

I am not sure if you guys have the latest versions.
I haven't seen any posting with the new code, after your posting of the existence of bugs in the second version of the explain. I for one would really be interested in the code.

I use most of your queries, and enjoy them daily.

Arnoud.
 
Back
Top