Re: Elapsed time of active running query

From: <anelson77388_at_gmail.com>
Date: Fri, 31 Oct 2008 07:17:37 -0700
Message-ID: <00163628355a688997045a8d4278@google.com>


Join v$session where status = 'ACTIVE' to v$session_longops on sid and serial#. This will identify queries that are doing a lot of reads either logical or physical.

I'm not sure how frequently you can sample this without creating problems for yourself.

Allan

On Oct 30, 2008 4:31pm, Michael Schmitt <mschmitt_at_uchicago.edu> wrote:
>
>
>
>
>
>
>
>
>
>
> Hi All,
>
>
>
>
>
> This question is for a 10.2.0.3 database
>
>
>
>
>
> I am looking for help on writing a SQL
> statement that will tell me which sessions have an active running query
that have
> run for 10 minutes or more from the user’s perspective. For
> example, if a user executes “select * from table A” which holds 10
> million rows, I would like this script to identify their session when the
users
> stop watch is over 10 minutes (from the time they started their query).
>
>
>
>
>
> I was hoping last_call_et would give me
> this information; however it pretty much stays at 0 due to waits I guess
(and
> status of inactive).
>
>
>
>
>
> I need this to be for statements while
> they are running.
>
>
>
>
>
> Thanks in advance
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>

--
http://www.freelists.org/webpage/oracle-l
Received on Fri Oct 31 2008 - 09:17:37 CDT

Original text of this message