v$session.sql_hash_value = v$sqlarea.hash_value
or
v$session.sql_address = v$sqlarea.address
- Original Message -
To: Multiple recipients of list ORACLE-L [EMAIL PROTECTED]
Sent: Wednesday, March 12, 2003 10:18 AM
I'm suffering from a senior moment.
The question is at the every
Join sql_address from v$session to address from v$sqlarea .
Regards,
Denny
Quoting [EMAIL PROTECTED]:
I'm suffering from a senior moment.
The question is at the every bottom.
SQL select sql_text from v$sqlarea sa where buffer_gets 1
SQL_TEXT
Perhaps this is what you're looking for?
select sql_text ,sid, username, osuser, logon_time
from v$sqlarea sa, v$session ss
where sa.buffer_gets 1-- that's a lot of gets!
and sa.hash_value = ss.sql_hash_value;
HTH! GL! :)
Rich
Rich Jesse
How about:
SELECT a.sid,
a.username,
c.disk_reads,
c.buffer_gets,
c.sorts,
c.executions,
c.rows_processed,
c.sql_text
FROM v$session a,
v$sqlarea c
WHERE a.sid = sessid
AND a.sql_address = c.address
-- AND a.SQL_HASH_VALUE =
charlie I think sqlarea and session has no direct relationship . Same sql
can belong to many sessions and columns like users_opening, users_executing
suggests this. There should be one entry in sqlarea per hashaddress I guess
.
may user v$open_cursors to join with addess and sid .
-ak
-
:
Subject: RE: v$sqlarea v$session
03/12/2003 11:06
AM
[EMAIL PROTECTED] wrote:
I'm suffering from a senior moment.
The question is at the every bottom.
SQL select sql_text from v$sqlarea sa where buffer_gets 1
SQL_TEXT
SELECT RP.RELPART FROM
How about:
SELECT a.sid,
a.username,
c.disk_reads,
c.buffer_gets,
c.sorts,
c.executions,
c.rows_processed,
c.sql_text
FROM v$session a,
v$sqlarea c
WHERE a.sid = sessid
AND a.sql_address = c.address
-- AND a.SQL_HASH_VALUE
Join sql_address from v$session to address from v$sqlarea .
Regards,
Denny
Quoting [EMAIL PROTECTED]:
I'm suffering from a senior moment.
The question is at the every bottom.
SQL select sql_text from v$sqlarea sa where buffer_gets 1
SQL_TEXT
:
Sent by: Subject: Re: v$sqlarea v$session
[EMAIL PROTECTED
Just as a passing note - when you
query v$sqlarea like this it thrashes
the heck out of the library cache latch.
(And v$sqlarea is also an aggregate
view of x$kglob - so for a large shared
pool you could end up with a massive
sort and thrash of the temporary tablespace
as the view is
11 matches
Mail list logo