Re: Elapsed time of active running query

  • From: anelson77388@xxxxxxxxx
  • To: "Michael Schmitt <mschmitt@xxxxxxxxxxxx> ORACLE-L" <oracle-l@xxxxxxxxxxxxx>
  • Date: Fri, 31 Oct 2008 07:17:37 -0700

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@xxxxxxxxxxxx> 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


















Other related posts: