Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.server -> Re: show runtime for all active queries

Re: show runtime for all active queries

From: Karen Abgarian via DBMonster.com <forum_at_DBMonster.com>
Date: Wed, 23 Mar 2005 23:39:37 GMT
Message-ID: <eb2969572dcc4c2f92836799dfd3168d@DBMonster.com>


Chris,

The statement should not work. The join condition should be on SQL_ADDRESS in V$SESSION and ADDRESS in V$SQL. Some also add HASH_VALUE. Note that this query will show the last statement
executed, not necessarily the one executing right now, like MySQL does.

To get the one executing right now, check if STATUS in V$SESSION is ACTIVE. To check how long ago it was started, use LAST_CALL_ET. The latter is similar to that in SHOW FULL PROCESSLIST.

Finally, in Oracle, you can get a finer idea what the server is doing while executing your query. To obtain that information, join with V $SESSION_WAIT. On the other hand, Oracle does not explain what exactly it is doing, f.e. "sorting" or "fetching records", and it, in fact, can't, because these steps may be occuring simultaneously ...

-- 
Message posted via http://www.dbmonster.com
Received on Wed Mar 23 2005 - 17:39:37 CST

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US