Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.server -> Re: Duration of Transaction
wumutek_at_yahoo.com (Vincento Harris) wrote in message news:<2fa13ee7.0401070427.74ba6a8b_at_posting.google.com>...
> I will like to get the duration of a transaction
>
> Start_time from v$transaction tells when the transaction started.
>
> Need help performing the calculation of sysdate-start_time to give
> the duration of transaction.Hopefully the query will be on the
> V$transaction view not on session_longops whose results have not been
> very dependable(at least for me)
> Hp unix
> oracle 8.1.7.4
>
>
> Thanks in advance
>
> Vincento
Vincento, you should be a little more specific exactly what problem you are having. The following code will generate the duration (in days) from the current sysdate to the transition start time. You can convert this to days, hours, minutes, seconds are desired using a little date math.
SQL> l
1 select sysdate - to_date(start_time,'mm/dd/yy hh24:mi:ss')
2* from v$transaction
SQL> /
SYSDATE-TO_DATE(START_TIME,'MM/DD/YYHH24:MI:SS')
.000648148
But in general most transactions are very short and you will not even see them. Are you interested only in long running processes?
HTH -- Mark D Powell --
The ab Received on Wed Jan 07 2004 - 13:45:51 CST
![]() |
![]() |