Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Mailing Lists -> Oracle-L -> Re: Query capture
On Apr 7, 2005 4:31 PM, Wolfgang Breitling <breitliw_at_centrexcc.com> wrote:
>
> Just as an aside, be aware that sql_text in v$sql contains only the
> first 1000 bytes of the sql. If it is longer you'll have to retrieve it
> from v$sqltext (by address or hash_value-child_number).
>
I had a bit of a play around with the SQL John posted and came up with this:
select rownum place, query, timeinseconds, cur_id, address
from (
select a.sql_text query,
a.elapsed_time/(1000000*a.executions) timeinseconds, a.hash_value cur_id, a.address
I noticed I was getting some rows which had nothing in the SQL_TEXT column, when I looked them up in v$sqltext, via the hash_value or the address, the text was there.
Stephen
-- It's better to ask a silly question than to make a silly assumption. -- http://www.freelists.org/webpage/oracle-lReceived on Thu Apr 07 2005 - 12:23:47 CDT
![]() |
![]() |