Re: Query time

  • From: Dion Cho <ukja.dion@xxxxxxxxx>
  • To: Tom.Terrian.ctr@xxxxxxx
  • Date: Tue, 11 May 2010 09:50:12 +0900

For the elapsed time from the user perspective,

< 11g : basically impossible.
>= 11g : v$session. sql_exec_start column shows the start time of the query
executed by the session

1. the problem of v$session.last_call_et

v$session.last_call_et is invalidated when the session status changes from
active to inactive. Suppose you're fetching lots of rows from the database.
The corresponding server process would be in active status while retrieving
rows from the database, but it gets inactive after transferring the rows to
the client.

For this reason, there are such cases that even when the client is executing
the query for 10min, v$session.last_call_et is always under a couple of
seconds.


2. the problem of v$sql.elapsed_time

What OP wants to get is the elapsed time of the query being executed by the
specific session. The value of V$SQL is not per session, but per SQL.



================================
Dion Cho - Oracle Performance Storyteller

http://dioncho.wordpress.com (english)
http://ukja.tistory.com (korean)
http://dioncho.blogspot.com (japanese)
http://ask.ex-em.com (q&a)
================================


2010/5/11 Terrian, Thomas J Mr CTR DLA J6DIB <Tom.Terrian.ctr@xxxxxxx>

> Is there a column somewhere which shows how long a user has been running
> the
> current query?
>
  • References:
    • Query time
      • From: Terrian, Thomas J Mr CTR DLA J6DIB

Other related posts: