Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.server -> Re: show runtime for all active queries
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.comReceived on Wed Mar 23 2005 - 17:39:37 CST
![]() |
![]() |