RE: Query time
- From: "Terrian, Thomas J Mr CTR DLA J6DIB" <Tom.Terrian.ctr@xxxxxxx>
- To: "Dion Cho" <ukja.dion@xxxxxxxxx>
- Date: Tue, 11 May 2010 09:50:01 -0400
That answers a lot of questions...thanks. -----Original Message----- From: Dion Cho [mailto:ukja.dion@xxxxxxxxx] Sent: Monday, May 10, 2010 8:50 PM To: Terrian, Thomas J Mr CTR DLA J6DIB Cc: oracle-l@xxxxxxxxxxxxx Subject: Re: Query time 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?