Total wait time per session incurred by SQL locks

Total wait time per session incurred by SQL locks

Post by Mike Burde » Sun, 31 Dec 1899 09:00:00



Is it possible to view, during a session, or at the end of the session, the
total amount of time the session was/is waiting for an Oracle lock(s) to be
released.

For example, if the session has completed and there are three SQL statements
that waited for 10,5 and 50 seconds respectively the total wait time would
be 65 seconds.

 
 
 

Total wait time per session incurred by SQL locks

Post by Jonathan Lewi » Sun, 31 Dec 1899 09:00:00


The name of the wait may vary slightly with version,
but look at v$session_event for 'enqueue' waits.  You
will need to have timed_statistics = true to get times.
You may also (depending on application) want to
look at something with a name like 'PL/SQL sleep waits'.

Best bet:
    connect as SYS

    create or replace view v$my_session_event
    as
    select * from v$session_event
    where sid in (
            select sid from v$session
           where audsid = userenv('sessionid')
    );

    grant select on v$my_session_event to public;
    create public synonym v$my_session_event;

--

Jonathan Lewis
Yet another Oracle-related web site:  http://www.jlcomp.demon.co.uk


>Is it possible to view, during a session, or at the end of the session, the
>total amount of time the session was/is waiting for an Oracle lock(s) to be
>released.

>For example, if the session has completed and there are three SQL
statements
>that waited for 10,5 and 50 seconds respectively the total wait time would
>be 65 seconds.


 
 
 

1. IDS license count per user or per session?

The question has been asked before here on c.d.i., but it's elicited
conflicting answers.  Some have said the license count is per session,
unless there's a Web server, transaction monitor, or similar gadget that
multplexes user connections; in which case the count is per user.

Others have said the license count is per user.  I read several posts circa
1995 stating that the count is per user, with up to five sessions allowed
per user.

Our reseller has always said it's per user.  One of my coworkers called IBM
the other day and was told the count is per session.   But if that's the
case, we could theoretically recode our apps for a Web interface and run
Workgroup Edition; and that can't be right.  Anyone know where to find an
authoritative answer?

Thanks in advance,

John Keefer

2. Need info on Unicorn database structure

3. Performance: Lock Object, Avg Wait Time

4. Delphi 2.0 Tbatchmove and Access Violation

5. Wait time for locks

6. US-VA-ORACLE 11I / FINANCIALS DBA

7. Trace SQL in a session with bind and wait events 8i

8. HELP: Calculating with date format in a field

9. Computing Login / Logout times | Total complete time

10. Select error: A time out occcured while waiting for memory resources (SQL Server 7.0, SP2)

11. Total bytes per row?

12. How do I return N results per page + total number of results

13. Totals per page