Wait event problem

I have problem with enq: TM – contention wait events.
From ASH report in Top Event P1/P2/P3 I find problematic object – table T1. It has two columns C1 and C2. There are PK and FK constraints on these two columns.Table T1 has one UNIQUE INDEX - index_name(C1, C2).
With this:
SELECT * FROM (
SELECT c.table_name, cc.column_name, cc.position column_position
FROM   user_constraints c, user_cons_columns cc
WHERE  c.constraint_name = cc.constraint_name
AND    c.constraint_type = 'R'
MINUS
SELECT i.table_name, ic.column_name, ic.column_position
FROM   user_indexes i, user_ind_columns ic
WHERE  i.index_name = ic.index_name
+)+
ORDER BY table_name, column_position;
I find unindexed Foreign Key constraints, and show me that no index on C2 column.
Can I create new index on this C2 column: CREATE INDEX index_name_c2 ON T1(C2) because I have index on C1 and C2 columns ?
In ASH report in Top DB Objects I see another indexes and table with enq: TM – contention event. Whey Oracle show me this objects?

Based on what you've written I see nothing that should stop you from creating an index but I would recommend you do so in dev or test before production.
As to why Oracle is showing it to you? Likely because it thinks there is a potential issue there.
Remember always that the best designed database in the world is going to have a top 5 or top 10 list too. The only way to not have events reported is with shutdown abort.

Similar Messages

  • Correlations in Workflow - wait for Delete event problem

    Hi All,
    I am working on version ECC5.
    I have a workflow that needs to wait for any changes to i0008, i0007, i0509 and i2001 for the person who is the subject of the workflow.  I have used correlations to do this and it is all working fine except for the Delete event.
    For each infotype I wait for each event ie. Approved, Changed, Created, ApprovedCancelled and Delete.  When the events are published the wait event is triggered and the workflow goes to the next steps where it does a recalculation,  fires off a new workflow and ends the current one.  This is working for all of the events except Delete.  The Delete event is set up exactly the same as the rest, but somehow the workflow wait event is not triggered.  It is happening with the Delete event for all the Infotypes I am waiting for.
    Does anybody have any suggestions as to what may be the problem. 
    Thanks
    Sandra

    Arghadip/Martin thanks for your replies.
    Yes, the delete event is being published.  I am using the same object e.g BasicPay for the delete event that I am using for the other events - Approved, Created etc. that are working.   The correlation and the wait for event steps are set up exactly the same way as they are for the events that are working.  I find it curious that the delete event doesn't work for any of the infotypes.   Why?  Could it be that when a record is deleted the object no longer exists?
    Any suggestions?
    Thanks
    Sandra

  • My wait events - can anyone see a problem?

    hi,
    this is what i have, can anyone see a problem?
    thanks
    EVENT                               TOTAL_WAITS  PCT_WAITS TIME_WAIT_SEC PCT_TIME_WAITED TOTAL_TIMEOUTS PCT_TIMEOUTS AVERAGE_WAIT_SEC
    Streams AQ: qmn slave idle wait          148147         .3    4051461.88           38.04           3478          .07            27.35
    Streams AQ: qmn coordinator idle wa      291006        .59    3962890.53           37.21         148370         3.13            13.62
    it
    Streams AQ: waiting for time manage         948          0     2021434.2           18.98            948          .02          2132.31
    ment or cleanup tasks
    control file parallel write             1292057       2.64     266839.64            2.51              0            0              .21
    log file parallel write                28433394      58.02     134658.55            1.26              0            0                0
    db file sequential read                 8307195      16.95      69830.07             .66              0            0              .01
    free buffer waits                       3117839       6.36      43374.04             .41        3106093        65.55              .01
    log buffer space                          55520        .11       20810.2              .2          20235          .43              .37
    db file scattered read                   583604       1.19      18169.58             .17              0            0              .03
    write complete waits                      17946        .04      17536.66             .16          17941          .38              .98
    log file sync                            282268        .58      10005.35             .09           9369           .2              .04
    enq: RO - fast object reuse               26602        .05       6623.44             .06           2171          .05              .25
    enq: CF - contention                       1839          0       5178.14             .05           1723          .04             2.82
    Streams AQ: qmn coordinator waiting         999          0       4311.01             .04            883          .02             4.32
    for slave to start
    buffer busy waits                         32464        .07       3898.51             .04           3950          .08              .12
    control file sequential read            2199199       4.49       3558.34             .03              0            0                0
    SGA: MMAN sleep for component shrin      234330        .48       2523.65             .02         234216         4.94              .01
    k
    buffer exterminate                         1583          0       1539.72             .01           1573          .03              .97
    library cache pin                           317          0        927.71             .01            316          .01             2.93
    enq: CI - contention                       1829          0        570.84             .01            159            0              .31
    log file switch completion                 1658          0        517.18               0            425          .01              .31
    enq: TX - row lock contention               257          0         438.8               0            149            0             1.71
    read by other session                     27269        .06        355.17               0             52            0              .01
    os thread startup                          3869        .01        338.67               0             98            0              .09
    latch: shared pool                          760          0        285.87               0              0            0              .38
    latch: row cache objects                    664          0           250               0              0            0              .38
    Data file init write                      16324        .03        231.59               0              0            0              .01
    reliable message                          19189        .04        218.16               0            170            0              .01
    latch: library cache                        483          0        172.51               0              0            0              .36
    SQL*Net message from dblink             1143086       2.33        128.69               0              0            0                0
    latch free                                 6091        .01         121.1               0              0            0              .02
    library cache load lock                      90          0         89.48               0             18            0              .99
    log file single write                      1894          0         69.76               0              0            0              .04
    cursor: pin S wait on X                    5183        .01         55.87               0           5165          .11              .01
    local write wait                           6732        .01         42.58               0              2            0              .01
    log file switch (checkpoint incompl          95          0         42.11               0             30            0              .44
    ete)
    row cache lock                              119          0         30.96               0             10            0              .26
    SQL*Net more data from dblink             17198        .04         25.92               0              0            0                0
    log file switch (private strand flu          69          0         17.54               0              5            0              .25
    sh incomplete)
    enq: HW - contention                        180          0         16.53               0              5            0              .09
    enq: PR - contention                          9          0          14.5               0              2            0             1.61
    enq: JS - queue lock                         51          0         12.36               0              0            0              .24
    SQL*Net more data to client               48311         .1         11.66               0              0            0                0
    enq: TM - contention                         12          0         10.66               0              3            0              .89
    class slave wait                           3128        .01          7.03               0              1            0                0
    JS coord start wait                          68          0          6.42               0             68            0              .09
    direct path write                         92712        .19          6.06               0              0            0                0
    control file heartbeat                        1          0          3.91               0              1            0             3.91
    PX Deq: Par Recov Execute                   100          0           3.8               0              0            0              .04
    log file sequential read                   1900          0          2.88               0              0            0                0
    single-task message                          50          0          2.61               0              0            0              .05
    enq: TX - contention                         11          0          2.38               0              0            0              .22
    undo segment extension                  1181001       2.41          1.95               0        1180981        24.92                0
    db file single write                        165          0           1.3               0              0            0              .01
    enq: TX - index contention                   97          0          1.27               0              0            0              .01
    LGWR wait for redo copy                   20840        .04           .66               0              0            0                0
    JS kgl get object wait                        8          0           .63               0              8            0              .08
    SQL*Net message to dblink               1143086       2.33           .55               0              0            0                0
    kksfbc child completion                      14          0           .55               0             11            0              .04
    direct path read temp                    217237        .44           .41               0              0            0                0
    latch: cache buffers chains                2138          0           .37               0              0            0                0
    latch: messages                            1245          0           .27               0              0            0                0
    latch: redo writing                         786          0           .15               0              0            0                0
    PX Deq: Par Recov Reply                      65          0           .09               0              0            0                0
    latch: checkpoint queue latch               171          0           .09               0              0            0                0
    latch: redo allocation                     1029          0           .08               0              0            0                0
    latch: cache buffers lru chain              268          0           .07               0              0            0                0
    SGA: allocation forcing component g           5          0           .05               0              2            0              .01
    rowth
    db file parallel read                        83          0           .04               0              0            0                0
    latch: In memory undo latch                 558          0           .04               0              0            0                0
    latch: object queue header operatio         338          0           .04               0              0            0                0
    n
    direct path read                           5042        .01           .03               0              0            0                0
    PX Deque wait                                 7          0           .02               0              0            0                0
    direct path write temp                     4691        .01           .02               0              0            0                0
    enq: SQ - contention                          1          0           .02               0              0            0              .02
    latch: session allocation                   190          0           .02               0              0            0                0
    PX Deq: Join ACK                             15          0           .01               0              0            0                0
    cursor: pin S                               894          0           .01               0              0            0                0
    enq: TX - allocate ITL entry                 37          0           .01               0              0            0                0
    kkdlgon                                      15          0           .01               0              0            0                0
    latch: enqueue hash chains                   37          0           .01               0              0            0                0
    library cache lock                            1          0           .01               0              0            0              .01
    Log archive I/O                               1          0             0               0              0            0                0
    PX Deq: Par Recov Change Vector               2          0             0               0              0            0                0
    PX Deq: Signal ACK                            3          0             0               0              0            0                0
    PX Deq: Test for msg                          1          0             0               0              0            0                0
    PX qref latch                                 1          0             0               0              1            0                0
    SQL*Net break/reset to dblink                 5          0             0               0              0            0                0
    SQL*Net more data to dblink                   1          0             0               0              0            0                0
    buffer deadlock                              27          0             0               0             27            0                0
    checkpoint completed                          4          0             0               0              0            0                0
    cursor: mutex S                               3          0             0               0              0            0                0
    cursor: mutex X                               1          0             0               0              0            0                0
    enq: JS - q mem clnup lck                     1          0             0               0              0            0                0
    enq: PS - contention                          2          0             0               0              0            0                0
    enq: US - contention                          1          0             0               0              0            0                0
    instance state change                         2          0             0               0              0            0                0
    latch: library cache lock                     4          0             0               0              0            0                0
    latch: library cache pin                      1          0             0               0              0            0                0
    latch: object queue header heap               8          0             0               0              0            0                0
    latch: undo global data                       3          0             0               0              0            0                0
    recovery read                                39          0             0               0              0            0                0

    Hi,
    If its for a week than I won't bother. Probably you should try to get teh same report for these wait events in a much smaller period , like 20-30minutes of time period when your db is fully operational. If still at that time the wait events,these or any other, shoot up to high wait times, things can be investigated more deeply.
    HTH
    Aman....

  • Problem identifying db object for "buffer busy waits" event.

    10.2.0.3
    AIX 64
    SELECT username, a.p1text, a.p1, a.p2text, a.p2, a.p3text, a.p3, event FROM v$session a WHERE
    a.status='ACTIVE'
    AND a.event = 'buffer busy waits'
    Query reports about 40 active sessions with this information:
    file# 3746
    block# 2
    class# 13
    select
    owner,
    segment_name,
    segment_type
    from
    dba_extents
    where
    file_id = 3746
    and
    2 between block_id and block_id + blocks -1;
    no rows returned
    SELECT MAX(a.file#) FROM sys.file$ a
    3535
    This was only a temporary situation when after couple of minutes(7) wait event "buffer busy waits" dissapeared completely.
    Any ideas?
    Thank you,
    Daniel.

    http://perfvision.com/papers/06_buffer_cache.ppt
    Slide 80-81 points at increasing the size of the initial and next extent for File Header Block buffer busy waits
    Side 85 points at high extent allocation for File Header Block buffer busy waits
    http://perfvision.com/ftp/hotsos/aas.ppt
    Side 55 points at extent allocation too small/too many extents being allocated for File Header Block buffer busy waits
    A couple hints from the documentation:
    http://download.oracle.com/docs/cd/B19306_01/server.102/b14211/instance_tune.htm
    "To determine the possible causes [of buffer busy waits], first query V$SESSION to identify the value of ROW_WAIT_OBJ# when the session waits for buffer busy waits."
    "To identify the object and object type contended for, query DBA_OBJECTS using the value for ROW_WAIT_OBJ# that is returned from V$SESSION."
    "V$SEGMENT_STATISTICS - This is a user-friendly view of statistic values. In addition to all the columns of V$SEGSTAT, it has information about such things as the segment owner and table space name. It makes the statistics easy to understand, but it is more costly."
    You may want to query DBA_TEMP_FILES for the specific FILE_ID identified by the V$SESSION. Taking a look at V$SEGMENT_STATISTICS might also be helpful.
    Are you using dictionary managed tablespaces, locally managed tablespaces with manual extent size management, ASSM with manual extent size management, or ASSM with automatic extent size management?
    Charles Hooper
    IT Manager/Oracle DBA
    K&M Machine-Fabricating, Inc.

  • Problems with a wait event

    Hello everyone,
    Thanks in advance for any help given, i am new to workflows.
    I modified a workflow and at some point i copied some of the logic that another workflow has, when it comes to the wait event i copied it exactly the same.
    When i trigger the event that should make the evet continue it is not working. Is there anything I should do for my wait event in the workflow to work? I copied it exactly as the other workflow ahs it, even the parameters are called the same in the workflow.
    Is there anytrhing that needs to be done for the wait events that i should know about?
    Thanks for the help

    Hello,
    I did use SWU_OBUF, thanks :).
    When an order is accepted or rejected the event should be triggered, as it happens with the other workflow (the one i copied the logic from for that part). It works like this: the workflow creates an order that is in sent status, i can go and change it to activated or to rejected, when this happens the event should listen to the save and should trigger the rest of the workflow.
    I have no idea why it is not working, as the flow is the same that is being used in another workflow, that also creates and order that goes into sent status.
    Thanks for all help,

  • Library Cache Pin Wait Event (within the context of APEX)

    Hello,
    Firstly -
    Oracle Version: 10.2.0.4.0
    Apex Version: 3.0.1.00.08
    Okay, my colleague (no really! This isn't one of those "Ahem ... A friend of mine has contracted something nasty +downstairs+..."-type questions) is having problems compiling a package (using TOAD incidentally, but it's the same in SQL Developer).
    I've searched the forum and the web for a bit of help on what's maybe happening here and it appears to be related to a concurrency conflict with the package definition - from what I can understand it's a case of the package is in use by another session, therefore another session cannot alter it at the same time (which makes sense)
    "What does this have to do with APEX?"... well, he is working on this package using the following methodology:
    1. Compile the package body/spec (as necessary - body more often obviously)
    2. run an apex page which uses the code in a process, which may or may not result in the error page being displayed
    3. Making changes to the package body/spec
    repeat steps 1-3 ad nauseum...
    He is the only user directly accessing the schema (and the only user accessing the page via APEX too, although I appreciate this isn't quite the same thing).
    I was wondering if, due to the architecture of APEX (the use of session pools etc), the state of a package might be being retained in some manner, thus resulting in this library cache pin wait event? If so, is there anything I can do to mitigate against this occurring?
    p.s. the only difference I can see between this particular package and any other package in the schema is that this one interacts with blobs (including making references to the wwv_flow_files view) - with blobs being passed as parameters between procedures (thus potentially creating temporary blobs which may or may not being closed).
    Any ideas?
    p.p.s. there are also no DBMS_SCHEDULER jobs or anything that might potentially be running the code incidentally...
    Edited by: Joel_C on 11-Nov-2011 11:58
    We got our DBAs to run a bit of code to identify the blocking session:
    select
             decode(lob.kglobtyp, 0, 'NEXT OBJECT', 1, 'INDEX', 2, 'TABLE', 3, 'CLUSTER',
                          4, 'VIEW', 5, 'SYNONYM', 6, 'SEQUENCE',
                          7, 'PROCEDURE', 8, 'FUNCTION', 9, 'PACKAGE',
                          11, 'PACKAGE BODY', 12, 'TRIGGER',
                          13, 'TYPE', 14, 'TYPE BODY',
                          19, 'TABLE PARTITION', 20, 'INDEX PARTITION', 21, 'LOB',
                          22, 'LIBRARY', 23, 'DIRECTORY', 24, 'QUEUE',
                          28, 'JAVA SOURCE', 29, 'JAVA CLASS', 30, 'JAVA RESOURCE',
                          32, 'INDEXTYPE', 33, 'OPERATOR',
                          34, 'TABLE SUBPARTITION', 35, 'INDEX SUBPARTITION',
                          40, 'LOB PARTITION', 41, 'LOB SUBPARTITION',
                          42, 'MATERIALIZED VIEW',
                          43, 'DIMENSION',
                          44, 'CONTEXT', 46, 'RULE SET', 47, 'RESOURCE PLAN',
                          48, 'CONSUMER GROUP',
                          51, 'SUBSCRIPTION', 52, 'LOCATION',
                          55, 'XML SCHEMA', 56, 'JAVA DATA',
                          57, 'SECURITY PROFILE', 59, 'RULE',
                          62, 'EVALUATION CONTEXT',
                         'UNDEFINED') object_type,
             lob.KGLNAOBJ object_name,
             pn.KGLPNMOD lock_mode_held,
             pn.KGLPNREQ lock_mode_requested,
             ses.sid,
             ses.serial#,
             ses.username
        FROM
           x$kglpn pn,
           v$session ses,
           x$kglob lob,
           v$session_wait vsw
      WHERE
       pn.KGLPNUSE = ses.saddr and
       pn.KGLPNHDL = lob.KGLHDADR
       and lob.kglhdadr = vsw.p1raw
       and vsw.event = 'library cache pin'
    order by lock_mode_held descresults as follows (I've changed some object names to protect the ignorant):
    OBJECT_TYP OBJECT_NAME                   LOCK_MODE_HELD LOCK_MODE_REQUESTED        SID    SERIAL# USERNAME
    PACKAGE    PKG_FOOBAR                             2                   0        356      21694 HTMLDB_PUBLIC_U
                                                                                                      SER
    PACKAGE    PKG_FOOBAR                             0                   3        463      22309 FOOHTMLDB_PUBLIC_USER is the apex user incidentally. The session is marked in the v$session table as "inactive", the last statement being
    Begin
       Dbms_session.reset_package;
    End;Edited by: Joel_C on 11-Nov-2011 14:39

    bump
    No-one?
    The problem seems to have 'resolved itself' over the weekend incidentally (although I don't believe anything truly resolves itself in this manner - something must have changed).

  • Wait events - how to read it

    Hi frnds,
    As, I'm beginner to performance tuning I dont know
    What action do i need to take?
    I mean how to read the output which I given below.
    this is the output suffering buffer busy waits.
    Could anyone please tell me
    CLASS TOTAL_WAITS TOTAL_TIME
    data block 93303 58711
    unused 0 0
    system undo header 12 232
    undo header 7847 6636
    3rd level bmb 0 0
    save undo header 0 0
    bitmap index block 0 0
    file header block 0 0
    free list 0 0
    undo block 68 207
    segment header 422 399
    extent map 0 0
    2nd level bmb 0 0
    system undo block 0 0
    sort block 0 0
    save undo block 0 0
    1st level bmb 1 17
    bitmap block 0 0
    Thanks, Muhammed Thameem. S

    Hello,
    "Buffer busy waits" is contention for a buffer (representing a specific
    version of a database block) within the Buffer Cache. So, in essence
    it is block contention and thus it is most likely something to do with
    the design of the tables and indexes supporting the application. A
    built-in bottleneck. On indexes, it could be the age-old problem of
    insertions into an index on a column with a monotonically-ascending
    data value (i.e. timestamps or sequence numbers) which tends to cause
    contention on the highest leaf node of the index. On tables, it might
    have to do with many concurrent insertions into a table in a
    freelist-managed tablespace where the table has only one freelist. It
    could also be due to a home-grown implementation of sequence-number
    generators (i.e. small table with one row, one column in which contains
    the "last value" of a sequence, etc) which lots of people use to avoid
    not being "portable across databases" which they think means not using
    Oracle sequences (yadda yadda yadda).
    I'd look for any SQL statement in the "SQL sorted by Elapsed Time"
    section of the AWR report which exhibits high elapsed time but
    relatively low CPU time, indicating a lot of wait time. Of course,
    there are something like 800 possible wait events in current releases
    of Oracle, of which "buffer busy waits" is only one, so this is just
    inference and not a direct causal connection to your problem. But,
    once I find such statements I'd check to see if they are
    accessing/manipulating tables within the CUBS_DATA tablespace, and then
    use "select * from table(dbms_xplan.display_awr('sql-id'))" to
    get the execution plan(s), and then look for something ineffective
    within the execution plan. You might find the script "sqlhistory.sql" helpful
    here as well, to get a "historical perspective" on the execution of the
    SQL statements over time, in case the buffer busy waits peaked at some
    point in the past
    Please refer to:
    http://www.pubbs.net/201003/oracle/51925-understanding-awr-buffer-waits.html
    Also
    http://www.remote-dba.net/oracle_10g_tuning/t_buffer_busy_waits.htm
    kind regards
    Mohamed

  • Wait events 'direct path write'  and 'direct path read'

    Hi,
    We have a query which is taking more that 2 min. It's a 9.2.0.7 database. We took the trace/tkprof of the query,and identified that there are so manay 'direct path write' and 'direct path read' wait events in the trace file.
    WAIT #3: nam='direct path write' ela= 5 p1=201 p2=70710 p3=15
    WAIT #3: nam='direct path read' ela= 170 p1=201 p2=71719 p3=15
    In the above, "p1=201" is a file_id, but we could not find any data file, temp file, control file with that id# 201.
    Can you please let us know what's "p1=201" here, how to identify the file which is causing the issue.
    Thanks
    Sravan

    What does:
    show parameter db_filesreturn? My guess, is that it returns 200.
    The direct file read and direct file write events are reads and writes to TEMP tablespace. In those wait events, the file# is reported as db_files+temp file id. So, 201 means temp file #1.
    Now, as to your actual performance problem.
    Without seeing the SQL and the corresponding execution plan, it's impossible to be sure. However, the most common causes of temp writes are sort operations and group by operations.
    If you decide to post your SQL and execution plan, please be sure to make it readable by formatting it. Information on how to do so can be found here.
    Hope that helps,
    -Mark
    Edited by: mbobak on May 1, 2011 1:50 AM

  • Wait event "virtual circuit wait" in wait class "Network" was consuming sig

    Hello,
    We are facing this problem when there are 2 queries try to run at the same time.
    The first query takes longer to finish so 2nd has to wait for 1st to be finished and then only 2nd starts. It seems the jam is at netowork instead of server.
    I want to make sure before I start testing on network.
    I get following :
    Wait event "virtual circuit wait" in wait class "Network" was consuming significant database time. 98.4
    Wait class "Network" was consuming significant database time.
    and recommendations is stated as :
    Investigate the cause for high "virtual circuit wait" waits with P1 ("circuit#") value "21" and P2 ("type") value "2".
    I am checking OEM.
    Thanks,
    Shashi.

    Hello Sybrand,
    Can you suggest some changes to be done to test ?
    Here is my shared server config :
    SQL> show parameter SHARED
    NAME TYPE VALUE
    hi_shared_memory_address integer 0
    max_shared_servers integer
    shared_memory_address integer 0
    shared_pool_reserved_size big integer 135895449
    shared_pool_size big integer 0
    shared_server_sessions integer
    shared_servers integer 1
    Thanks,
    Shashi.

  • Find the Wait events for an objects.

    Hi Gurus.
    I need you help to find out the wait events for a particular table and index when batch export job running from the application. I have done some work around to to find out, but i am not able to figure out the issue or what are the wait events. i am working on linux 4node rac 11gR2.
    Below are the steps i have done.
    1. find object_id for a table finding the wait events to that object_id.
    SYS@ccmintpt1 SQL>select data_object_id from dba_objects where object_name='ACCOUNT_DETAIL_DENORM';
    DATA_OBJECT_ID
    82646
    88518
    84184
    SYS@ccmintpt1 SQL>select w.sid,w.event,w.wait_class,w.wait_class# from gv$session s,gv$session_wait w where s.row_wait_obj#=82646;
    no rows selected
    SYS@ccmintpt1 SQL>select w.sid,w.event,w.wait_class,w.wait_class# from gv$session s,gv$session_wait w where s.row_wait_obj#=88518;
    no rows selected
    SYS@ccmintpt1 SQL>select w.sid,w.event,w.wait_class,w.wait_class# from gv$session s,gv$session_wait w where s.row_wait_obj#=84184;
    no rows selected
    2. find the object id for the index of that table and finding the wait events to that object_id.
    SYS@ccmintpt1 SQL>select data_object_id from dba_objects where object_name='XAK2ACCOUNT_DETAIL_DENORM';
    DATA_OBJECT_ID
    88655
    SID EVENT WAIT_CLASS WAIT_CLASS#
    1 rdbms ipc message Idle 6
    2 heartbeat monitor sleep Idle 6
    3 rdbms ipc message Idle 6
    4 wait for unread message on broadcast channel Idle 6
    6 SQL*Net message from client Idle 6
    7 SQL*Net message from client Idle 6
    8 SQL*Net message from client Idle 6
    9 SQL*Net message from client Idle 6
    10 SQL*Net message from client Idle 6
    11 SQL*Net message from client Idle 6
    12 SQL*Net message from client Idle 6
    13 SQL*Net message from client Idle 6
    1876 SQL*Net message from client Idle 6
    1877 VKTM Logical Idle Wait Idle 6
    1878 rdbms ipc message Idle 6
    1879 rdbms ipc message Idle 6
    1880 rdbms ipc message Idle 6
    1881 SQL*Net message from client Idle 6
    3200 SQL*Net message from client Idle 6
    3210 SQL*Net message from client Idle 6
    3212 db file sequential read User I/O 8
    3213 SQL*Net message from client Idle 6
    3214 SQL*Net message from client Idle 6
    3216 SQL*Net message from client Idle 6
    3751 rdbms ipc message Idle 6
    3752 gcs remote message Idle 6
    3754 rdbms ipc message Idle 6
    3756 SQL*Net message from client Idle 6
    3757 SQL*Net message from client Idle 6
    1326 SQL*Net message from client Idle 6
    1876 Streams AQ: waiting for time management or cleanup tasks Idle 6
    1877 VKTM Logical Idle Wait Idle 6
    1878 rdbms ipc message Idle 6
    1879 rdbms ipc message Idle 6
    1880 rdbms ipc message Idle 6
    1882 SQL*Net message from client Idle 6
    3751 rdbms ipc message Idle 6
    3752 gcs remote message Idle 6
    3754 rdbms ipc message Idle 6
    3756 rdbms ipc message Idle 6
    3758 SQL*Net message from client Idle 6
    3759 PX Deq: Execution Msg Idle 6
    3200 SQL*Net message from client Idle 6
    3210 SQL*Net message from client Idle 6
    3212 db file sequential read User I/O 8
    3213 SQL*Net message from client Idle 6
    3214 SQL*Net message from client Idle 6
    3216 SQL*Net message from client Idle 6
    3751 rdbms ipc message Idle 6
    3752 gcs remote message Idle 6
    3754 rdbms ipc message Idle 6
    3756 SQL*Net message from client Idle 6
    3757 SQL*Net message from client Idle 6
    3786 SQL*Net message from client Idle 6
    3787 SQL*Net message from client Idle 6
    1 heartbeat monitor sleep Idle 6
    2 wait for unread message on broadcast channel Idle 6
    314 rdbms ipc message Idle 6
    315 Streams AQ: qmn coordinator idle wait Idle 6
    627 pmon timer Idle 6
    628 rdbms ipc message Idle 6
    629 Streams AQ: waiting for messages in the queue Idle 6
    940 Streams AQ: waiting for time management or cleanup tasks Idle 6
    941 VKTM Logical Idle Wait Idle 6
    942 rdbms ipc message Idle 6
    1253 rdbms ipc message Idle 6
    1254 rdbms ipc message Idle 6
    1256 Space Manager: slave idle wait Idle 6
    1566 DIAG idle wait Idle 6
    1567 rdbms ipc message Idle 6
    1568 Streams AQ: qmn slave idle wait Idle 6
    1879 rdbms ipc message Idle 6
    1880 smon timer Idle 6
    1881 rdbms ipc message Idle 6
    2192 PING Idle 6
    2193 rdbms ipc message Idle 6
    2194 rdbms ipc message Idle 6
    2505 rdbms ipc message Idle 6
    2506 rdbms ipc message Idle 6
    2818 rdbms ipc message Idle 6
    2819 rdbms ipc message Idle 6
    2821 PX Deq: reap credit Other 0
    3131 DIAG idle wait Idle 6
    3132 jobq slave wait Idle 6
    3444 rdbms ipc message Idle 6
    3445 jobq slave wait Idle 6
    3757 ges remote message Idle 6
    3758 rdbms ipc message Idle 6
    3759 VKRM Idle Idle 6
    4070 gcs remote message Idle 6
    4072 rdbms ipc message Idle 6
    4383 gcs remote message Idle 6
    4385 PX Deq: Execution Msg Idle 6
    4696 rdbms ipc message Idle 6
    4697 rdbms ipc message Idle 6
    1 rdbms ipc message Idle 6
    2 heartbeat monitor sleep Idle 6
    3 rdbms ipc message Idle 6
    4 wait for unread message on broadcast channel Idle 6
    6 SQL*Net message from client Idle 6
    From this output, what are the waits events i need to take into consideration.
    Is this the right approach to follow?
    Please let me know.
    Thanks in advance.

    user13162661 wrote:
    Hi Gurus.
    I need you help to find out the wait events for a particular table and index when batch export job running from the application. I have done some work around to to find out, but i am not able to figure out the issue or what are the wait events. i am working on linux 4node rac 11gR2.
    Below are the steps i have done.
    1. find object_id for a table finding the wait events to that object_id.
    SYS@ccmintpt1 SQL>select data_object_id from dba_objects where object_name='ACCOUNT_DETAIL_DENORM';
    DATA_OBJECT_ID
    82646
    88518
    84184
    SYS@ccmintpt1 SQL>select w.sid,w.event,w.wait_class,w.wait_class# from gv$session s,gv$session_wait w where s.row_wait_obj#=82646;
    no rows selected
    SYS@ccmintpt1 SQL>select w.sid,w.event,w.wait_class,w.wait_class# from gv$session s,gv$session_wait w where s.row_wait_obj#=88518;
    no rows selected
    SYS@ccmintpt1 SQL>select w.sid,w.event,w.wait_class,w.wait_class# from gv$session s,gv$session_wait w where s.row_wait_obj#=84184;
    no rows selected
    2. find the object id for the index of that table and finding the wait events to that object_id.
    SYS@ccmintpt1 SQL>select data_object_id from dba_objects where object_name='XAK2ACCOUNT_DETAIL_DENORM';
    DATA_OBJECT_ID
    88655
    SID EVENT WAIT_CLASS WAIT_CLASS#
    1 rdbms ipc message Idle 6
    2 heartbeat monitor sleep Idle 6
    3 rdbms ipc message Idle 6
    4 wait for unread message on broadcast channel Idle 6
    6 SQL*Net message from client Idle 6
    7 SQL*Net message from client Idle 6
    8 SQL*Net message from client Idle 6
    9 SQL*Net message from client Idle 6
    10 SQL*Net message from client Idle 6
    11 SQL*Net message from client Idle 6
    12 SQL*Net message from client Idle 6
    13 SQL*Net message from client Idle 6
    1876 SQL*Net message from client Idle 6
    1877 VKTM Logical Idle Wait Idle 6
    1878 rdbms ipc message Idle 6
    1879 rdbms ipc message Idle 6
    1880 rdbms ipc message Idle 6
    1881 SQL*Net message from client Idle 6
    3200 SQL*Net message from client Idle 6
    3210 SQL*Net message from client Idle 6
    3212 db file sequential read User I/O 8
    3213 SQL*Net message from client Idle 6
    3214 SQL*Net message from client Idle 6
    3216 SQL*Net message from client Idle 6
    3751 rdbms ipc message Idle 6
    3752 gcs remote message Idle 6
    3754 rdbms ipc message Idle 6
    3756 SQL*Net message from client Idle 6
    3757 SQL*Net message from client Idle 6
    1326 SQL*Net message from client Idle 6
    1876 Streams AQ: waiting for time management or cleanup tasks Idle 6
    1877 VKTM Logical Idle Wait Idle 6
    1878 rdbms ipc message Idle 6
    1879 rdbms ipc message Idle 6
    1880 rdbms ipc message Idle 6
    1882 SQL*Net message from client Idle 6
    3751 rdbms ipc message Idle 6
    3752 gcs remote message Idle 6
    3754 rdbms ipc message Idle 6
    3756 rdbms ipc message Idle 6
    3758 SQL*Net message from client Idle 6
    3759 PX Deq: Execution Msg Idle 6
    3200 SQL*Net message from client Idle 6
    3210 SQL*Net message from client Idle 6
    3212 db file sequential read User I/O 8
    3213 SQL*Net message from client Idle 6
    3214 SQL*Net message from client Idle 6
    3216 SQL*Net message from client Idle 6
    3751 rdbms ipc message Idle 6
    3752 gcs remote message Idle 6
    3754 rdbms ipc message Idle 6
    3756 SQL*Net message from client Idle 6
    3757 SQL*Net message from client Idle 6
    3786 SQL*Net message from client Idle 6
    3787 SQL*Net message from client Idle 6
    1 heartbeat monitor sleep Idle 6
    2 wait for unread message on broadcast channel Idle 6
    314 rdbms ipc message Idle 6
    315 Streams AQ: qmn coordinator idle wait Idle 6
    627 pmon timer Idle 6
    628 rdbms ipc message Idle 6
    629 Streams AQ: waiting for messages in the queue Idle 6
    940 Streams AQ: waiting for time management or cleanup tasks Idle 6
    941 VKTM Logical Idle Wait Idle 6
    942 rdbms ipc message Idle 6
    1253 rdbms ipc message Idle 6
    1254 rdbms ipc message Idle 6
    1256 Space Manager: slave idle wait Idle 6
    1566 DIAG idle wait Idle 6
    1567 rdbms ipc message Idle 6
    1568 Streams AQ: qmn slave idle wait Idle 6
    1879 rdbms ipc message Idle 6
    1880 smon timer Idle 6
    1881 rdbms ipc message Idle 6
    2192 PING Idle 6
    2193 rdbms ipc message Idle 6
    2194 rdbms ipc message Idle 6
    2505 rdbms ipc message Idle 6
    2506 rdbms ipc message Idle 6
    2818 rdbms ipc message Idle 6
    2819 rdbms ipc message Idle 6
    2821 PX Deq: reap credit Other 0
    3131 DIAG idle wait Idle 6
    3132 jobq slave wait Idle 6
    3444 rdbms ipc message Idle 6
    3445 jobq slave wait Idle 6
    3757 ges remote message Idle 6
    3758 rdbms ipc message Idle 6
    3759 VKRM Idle Idle 6
    4070 gcs remote message Idle 6
    4072 rdbms ipc message Idle 6
    4383 gcs remote message Idle 6
    4385 PX Deq: Execution Msg Idle 6
    4696 rdbms ipc message Idle 6
    4697 rdbms ipc message Idle 6
    1 rdbms ipc message Idle 6
    2 heartbeat monitor sleep Idle 6
    3 rdbms ipc message Idle 6
    4 wait for unread message on broadcast channel Idle 6
    6 SQL*Net message from client Idle 6
    From this output, what are the waits events i need to take into consideration.
    Is this the right approach to follow?
    Please let me know.
    Thanks in advance.what actual problem are you trying to solve?
    post SQL & results that have you concerned about wait events

  • Lot of sessions with wait event - jobq slave wait

    Hi All,
    My db version is 10.2.0.4.0
    I have scheduled jobs through dbms_scheduler with repeat_interval of 20 mins(this for refresh of mviews).
    Now the job is in running state for a long time. then i checked the sessions..
    I have five session with wait event - "jobq slave wait"
    I check job_queue_parameter - 10
    select count(1) from dba_jobs;
    COUNT(1)
    8
    Now the job is in running state for a long time...
    Can someone help me how to proceed...
    Thanks,
    Suresh S.

    Post Operating System (OS) name & version for DB server system.
    Post results of
    SELECT * from v$version
    does following SQL return any rows? If so, they point to problem area.
    SELECT DECODE(request,0,'Holder: ','Waiter: ')||sid sess,
    id1, id2, lmode, request, type
    FROM V$LOCK
    WHERE (id1, id2, type) IN
    (SELECT id1, id2, type FROM V$LOCK WHERE request>0)
    ORDER BY id1, request
    /

  • Wait events

    Hi ! I have the following wait events in my top timed and I don't know who originated them:
    Wait Event Wait Time Summary Avg Wait Time (ms)
    I# Class Event Waits %Timeouts Total(s) Avg(ms) %DB time Avg Min Max Std Dev Cnt
    * DB CPU N/A N/A 59,651.48 N/A 45.87 2
    User I/O db file sequential read 4,369,213 0.0 20,831.46 4.8 16.02 4.72 4.29 5.14 0.60 2
    Other enq: CF - contention 155,822 3.9 10,390.74 66.7 7.99 68.62 60.31 76.94 11.76 2
    System I/O RMAN backup & recovery I/O 87,205 0.0 5,477.09 62.8 9.15 62.81 62.81 62.81 1
    Cluster gc current block 2-way 2,914,457 0.0 4,811.61 1.7 3.70 1.67 1.60 1.74 0.10 2
    System I/O control file sequential read 3,038,672 0.0 3,762.66 1.2 2.89 1.24 1.22 1.27 0.04 2
    Concurrenc os thread startup 2,842 0.0 3,695.14 1300.2 2.84 1311.83 1143.07 1480.59 238.66 2
    System I/O log file parallel write 1,341,907 0.0 2,530.17 1.9 1.95 1.88 1.88 1.89 0.01 2
    Other reliable message 471,495 0.1 2,388.01 5.1 1.84 5.08 4.12 6.03 1.35 2
    Concurrenc row cache lock 3,135,774 0.0 2,224.53 0.7 1.71 0.72 0.68 0.75 0.05 2
    1 DB CPU N/A N/A 22,584.30 N/A 37.75
    User I/O db file sequential read 2,451,215 0.0
    System I/O RMAN backup & recovery I/O 87,205 0.0
    Other enq: CF - contention 59,735 5.3
    Cluster gc current block 2-way 1,803,542 0.0
    System I/O control file sequential read 1,831,180 0.0
    Concurrenc os thread startup 1,323 0.0
    System I/O log file parallel write 727,883 0.0
    Cluster gc cr multi block request 523,744 0.0
    Concurrenc row cache lock 1,830,913 0.0
    2 DB CPU N/A N/A
    User I/O db file sequential read 1,917,998 0.0
    Other enq: CF - contention 96,087 3.0
    Cluster gc current block 2-way 1,110,915 0.0
    Concurrenc os thread startup 1,519 0.0
    System I/O control file sequential read 1,207,492 0.0
    User I/O direct path read 404,587 0.0
    Other reliable message 233,033 0.1
    System I/O log file parallel write 614,024 0.0
    System I/O control file parallel write 128,905 0.0
    Those are the most worrying events:
    enq: CF - contention
    I/O control file sequential read
    Concurrenc os thread startup
    I have been investigating and I wonder what is wrong to get Concurrenc os thread startup. According to one blog, os thread should be always related with network issues...
    The awr snapshot is from my production window day.
    Rac 11.2.0.3 two nodes on Solaris Sparc 10.

    I have studied the ASH in the problematic period and I have found that there are some full scans:
    Summary of All User Input
    Format         : TEXT
    DB Id          : 2752323407
    Inst num       : 1
    Begin time     : 08-Feb-13 09:30:00
    End time       : 08-Feb-13 10:20:00
    Slot width     : Default
    Report targets : 0
    Report name    : ashrpt_1_0208_1020.txt
    ASH Report For dbp/dbp1
    DB Name         DB Id    Instance     Inst Num Release     RAC Host
    dbp           2752323407 dbp1                1 11.2.0.3.0  YES host-dbp-1
    CPUs           SGA Size       Buffer Cache        Shared Pool    ASH Buffer Size
      16     12,651M (100%)    10,048M (79.4%)     1,921M (15.2%)       32.0M (0.3%)
              Analysis Begin Time:   08-Feb-13 09:30:00
                Analysis End Time:   08-Feb-13 10:20:00
                     Elapsed Time:        50.0 (mins)
                Begin Data Source:   DBA_HIST_ACTIVE_SESS_HISTORY
                                     in AWR snapshot 5100
                  End Data Source:   DBA_HIST_ACTIVE_SESS_HISTORY
                                     in AWR snapshot 5101
                                      + V$ACTIVE_SESSION_HISTORY
                     Sample Count:      10,069
          Average Active Sessions:       33.56
      Avg. Active Session per CPU:        2.10
                    Report Target:   None specified
    Top User Events                     DB/Inst: dbp/dbp1  (Feb 08 09:30 to 10:20)
                                                                   Avg Active
    Event                               Event Class        % Event   Sessions
    library cache lock                  Concurrency          43.73      14.68
    cursor: pin S wait on X             Concurrency          18.61       6.25
    CPU + Wait for CPU                  CPU                  15.77       5.29
    reliable message                    Other                 5.88       1.97
    enq: KO - fast object checkpoint    Application           3.48       1.17
    Top Background Events               DB/Inst: dbp/dbp1  (Feb 08 09:30 to 10:20)
                                                                   Avg Active
    Event                               Event Class     % Activity   Sessions
    CPU + Wait for CPU                  CPU                   1.25       0.42
    Top Cluster Events                  DB/Inst: dbp/dbp1  (Feb 08 09:30 to 10:20)
    Event                          % Event Remote I % Activity
    gc current block 2-way            1.72        2       1.72
    gc cr grant 2-way                 1.58      N/A       1.07
    Top Event P1/P2/P3 Values           DB/Inst: dbp/dbp1  (Feb 08 09:30 to 10:20)
    Event                          % Event  P1 Value, P2 Value, P3 Value % Activity
    Parameter 1                Parameter 2                Parameter 3
    library cache lock               43.75 "29115227816","29218763456","       1.22
    handle address             lock address               100*mode+namespace
                                           "29115227816","28694732944","       1.20
                                           "29115227816","28812373936","       1.17
    cursor: pin S wait on X          18.61 "1497800770","3934190043136",       1.54
    idn                        value                      where
                                           "1497800770","7773890805760",       1.15
    reliable message                  6.07 "30432532808","30354909248","       0.13
    channel context            channel handle             broadcast message
    enq: KO - fast object checkpoi    3.49      "1263468550","65640","1"       0.52
    name|mode                  2                          0
    db file sequential read           1.81               "1","25220","1"       0.01
    file#                      block#                     blocks
    Top Service/Module                  DB/Inst: dbp/dbp1  (Feb 08 09:30 to 10:20)
    Service        Module                   % Activity Action               % Action
    dbp_DVEBMGS11  CL_SQL_STATEMENT========      86.80 383                     86.80
    dbp_D10_0066   CL_SQL_STATEMENT========       6.28 383                      3.34
                                                       104                      2.94
    dbp_D10_0064   CL_SQL_STATEMENT========       2.40 383                      2.39
    SYS$BACKGROUND UNNAMED                        1.51 UNNAMED                  1.51
    Top Client IDs                      DB/Inst: dbp/dbp1  (Feb 08 09:30 to 10:20)
                      No data exists for this section of the report.
    Top SQL Command Types               DB/Inst: dbp/dbp1  (Feb 08 09:30 to 10:20)
    -> 'Distinct SQLIDs' is the count of the distinct number of SQLIDs
          with the given SQL Command Type found over all the ASH samples
          in the analysis period
                                               Distinct            Avg Active
    SQL Command Type                             SQLIDs % Activity   Sessions
    SELECT                                          485      94.56      31.74
    ALTER TABLE                                     220       2.89       0.97
    Top Phases of Execution             DB/Inst: dbp/dbp1  (Feb 08 09:30 to 10:20)
                                              Avg Active
    Phase of Execution             % Activity   Sessions
    Parse                               67.50      22.66
    SQL Execution                       30.46      10.22
    Hard Parse                           5.37       1.80
    Top Remote Instances                DB/Inst: dbp/dbp1  (Feb 08 09:30 to 10:20)
    Wait Class           % Wait  Remote I % Activity
    Cluster                 5.22        2       3.90
                                      N/A       1.27
    Top SQL with Top Events     DB/Inst: dbp/dbp1  (Feb 08 09:30 to 10:20)
                                                            Sampled #
                     SQL ID             Planhash        of Executions     % Activity
    Event                          % Event Top Row Source                    % RwSrc
              350v06jcnd822                  N/A                    0          18.03
    library cache lock                9.41 ** Row Source Not Available **       9.41
    SELECT "DT"."SID_0CALMONTH" AS "S____048" ,"D3"."SID_0MATERIAL" AS "S____006" ,
    "DU"."SID_0UNIT" AS "S____023" ,"DT"."SID_0CALDAY" AS "S____021" ,"D2"."SID_0MET
    YPE" AS "S____1342" ,"D2"."SID_0VTYPE" AS "S____504" ,"X33"."S__Z99GRMAT" AS "S_
    ___4443" , SUM ( "F"."QUANTITY" ) AS "Z____1299" , COUNT( * ) AS "Z____016"
                                             N/A                    0          18.03
    cursor: pin S wait on X           8.62 ** Row Source Not Available **       8.62
    SELECT "DT"."SID_0CALMONTH" AS "S____048" ,"D3"."SID_0MATERIAL" AS "S____006" ,
    "DU"."SID_0UNIT" AS "S____023" ,"DT"."SID_0CALDAY" AS "S____021" ,"D2"."SID_0MET
    YPE" AS "S____1342" ,"D2"."SID_0VTYPE" AS "S____504" ,"X33"."S__Z99GRMAT" AS "S_
    ___4443" , SUM ( "F"."QUANTITY" ) AS "Z____1299" , COUNT( * ) AS "Z____016"
              48unmtd983uz6                  N/A                    0          16.75
    library cache lock               12.87 ** Row Source Not Available **      12.87
    SELECT "DT"."SID_0CALDAY" AS "S____021" ,"DT"."SID_0CALMONTH" AS "S____048" ,"D
    3"."SID_0MATERIAL" AS "S____006" ,"DU"."SID_0UNIT" AS "S____023" ,"D2"."SID_0MET
    YPE" AS "S____1342" ,"D2"."SID_0VTYPE" AS "S____504" , SUM ( "F"."QUANTITY" )
    AS "Z____1299" , COUNT( * ) AS "Z____016" FROM "/BIC/FZ99IC114" "F" JOIN "/BIC
                                             N/A                    0          16.75
    cursor: pin S wait on X           3.88 ** Row Source Not Available **       3.88
    SELECT "DT"."SID_0CALDAY" AS "S____021" ,"DT"."SID_0CALMONTH" AS "S____048" ,"D
    3"."SID_0MATERIAL" AS "S____006" ,"DU"."SID_0UNIT" AS "S____023" ,"D2"."SID_0MET
    YPE" AS "S____1342" ,"D2"."SID_0VTYPE" AS "S____504" , SUM ( "F"."QUANTITY" )
    AS "Z____1299" , COUNT( * ) AS "Z____016" FROM "/BIC/FZ99IC114" "F" JOIN "/BIC
              350v06jcnd822           2426825131                    0          15.49
    library cache lock                9.74 ** Row Source Not Available **       9.74
    SELECT "DT"."SID_0CALMONTH" AS "S____048" ,"D3"."SID_0MATERIAL" AS "S____006" ,
    "DU"."SID_0UNIT" AS "S____023" ,"DT"."SID_0CALDAY" AS "S____021" ,"D2"."SID_0MET
    YPE" AS "S____1342" ,"D2"."SID_0VTYPE" AS "S____504" ,"X33"."S__Z99GRMAT" AS "S_
    ___4443" , SUM ( "F"."QUANTITY" ) AS "Z____1299" , COUNT( * ) AS "Z____016"
    cursor: pin S wait on X           4.14 ** Row Source Not Available **       4.14
    CPU + Wait for CPU                1.61 SELECT STATEMENT                     1.58
              48unmtd983uz6           3511339786                    0          14.98
    library cache lock               11.50 ** Row Source Not Available **      11.50
    SELECT "DT"."SID_0CALDAY" AS "S____021" ,"DT"."SID_0CALMONTH" AS "S____048" ,"D
    3"."SID_0MATERIAL" AS "S____006" ,"DU"."SID_0UNIT" AS "S____023" ,"D2"."SID_0MET
    YPE" AS "S____1342" ,"D2"."SID_0VTYPE" AS "S____504" , SUM ( "F"."QUANTITY" )
    AS "Z____1299" , COUNT( * ) AS "Z____016" FROM "/BIC/FZ99IC114" "F" JOIN "/BIC
    cursor: pin S wait on X           1.97 ** Row Source Not Available **       1.97
    CPU + Wait for CPU                1.51 SELECT STATEMENT                     1.42
              07tcvyb6frtkx           2929764020                    1           1.87
    gc cr grant 2-way                 0.80 TABLE ACCESS - BY USER ROWID         0.75
    SELECT "D3"."SID_0SHIP_TO" AS "SID" FROM "/BIC/FZ99IC035" "F" JOIN "/BIC/DZ99IC
    0352" "D2" ON "F" . "KEY_Z99IC0352" = "D2" . "DIMID" JOIN "/BI0/XMATERIAL" "X9"
    ON "D2" . "SID_0MATERIAL" = "X9" . "SID" JOIN "/BIC/DZ99IC0355" "D5" ON "F" .
    "KEY_Z99IC0355" = "D5" . "DIMID" JOIN "/BIC/DZ99IC0353" "D3" ON "F" . "KEY_Z99
    Top SQL with Top Events     DB/Inst: dbp/dbp1  (Feb 08 09:30 to 10:20)
                                                            Sampled #
                     SQL ID             Planhash        of Executions     % Activity
    Event                          % Event Top Row Source                    % RwSrc
    Top SQL with Top Row Sources        DB/Inst: dbp/dbp1  (Feb 08 09:30 to 10:20)
                                                            Sampled #
                     SQL ID             PlanHash        of Executions     % Activity
    Row Source                               % RwSrc Top Event               % Event
              350v06jcnd822                  N/A                    0          18.03
    ** Row Source Not Available **             18.03 library cache lock         9.41
    SELECT "DT"."SID_0CALMONTH" AS "S____048" ,"D3"."SID_0MATERIAL" AS "S____006" ,
    "DU"."SID_0UNIT" AS "S____023" ,"DT"."SID_0CALDAY" AS "S____021" ,"D2"."SID_0MET
    YPE" AS "S____1342" ,"D2"."SID_0VTYPE" AS "S____504" ,"X33"."S__Z99GRMAT" AS "S_
    ___4443" , SUM ( "F"."QUANTITY" ) AS "Z____1299" , COUNT( * ) AS "Z____016"
              48unmtd983uz6                  N/A                    0          16.75
    ** Row Source Not Available **             16.75 library cache lock        12.87
    SELECT "DT"."SID_0CALDAY" AS "S____021" ,"DT"."SID_0CALMONTH" AS "S____048" ,"D
    3"."SID_0MATERIAL" AS "S____006" ,"DU"."SID_0UNIT" AS "S____023" ,"D2"."SID_0MET
    YPE" AS "S____1342" ,"D2"."SID_0VTYPE" AS "S____504" , SUM ( "F"."QUANTITY" )
    AS "Z____1299" , COUNT( * ) AS "Z____016" FROM "/BIC/FZ99IC114" "F" JOIN "/BIC
              350v06jcnd822           2426825131                    0          15.49
    ** Row Source Not Available **             13.91 library cache lock         9.74
    SELECT "DT"."SID_0CALMONTH" AS "S____048" ,"D3"."SID_0MATERIAL" AS "S____006" ,
    "DU"."SID_0UNIT" AS "S____023" ,"DT"."SID_0CALDAY" AS "S____021" ,"D2"."SID_0MET
    YPE" AS "S____1342" ,"D2"."SID_0VTYPE" AS "S____504" ,"X33"."S__Z99GRMAT" AS "S_
    ___4443" , SUM ( "F"."QUANTITY" ) AS "Z____1299" , COUNT( * ) AS "Z____016"
    SELECT STATEMENT                            1.58 CPU + Wait for CPU         1.58
              48unmtd983uz6           3511339786                    0          14.98
    ** Row Source Not Available **             13.56 library cache lock        11.50
    SELECT "DT"."SID_0CALDAY" AS "S____021" ,"DT"."SID_0CALMONTH" AS "S____048" ,"D
    3"."SID_0MATERIAL" AS "S____006" ,"DU"."SID_0UNIT" AS "S____023" ,"D2"."SID_0MET
    YPE" AS "S____1342" ,"D2"."SID_0VTYPE" AS "S____504" , SUM ( "F"."QUANTITY" )
    AS "Z____1299" , COUNT( * ) AS "Z____016" FROM "/BIC/FZ99IC114" "F" JOIN "/BIC
    SELECT STATEMENT                            1.42 CPU + Wait for CPU         1.42
              07tcvyb6frtkx           2929764020                    1           1.87
    TABLE ACCESS - BY USER ROWID                1.59 gc cr grant 2-way          0.75
    SELECT "D3"."SID_0SHIP_TO" AS "SID" FROM "/BIC/FZ99IC035" "F" JOIN "/BIC/DZ99IC
    0352" "D2" ON "F" . "KEY_Z99IC0352" = "D2" . "DIMID" JOIN "/BI0/XMATERIAL" "X9"
    ON "D2" . "SID_0MATERIAL" = "X9" . "SID" JOIN "/BIC/DZ99IC0355" "D5" ON "F" .
    "KEY_Z99IC0355" = "D5" . "DIMID" JOIN "/BIC/DZ99IC0353" "D3" ON "F" . "KEY_Z99
    Top SQL using literals              DB/Inst: dbp/dbp1  (Feb 08 09:30 to 10:20)
    -> FORCE_MATCHING_SIGNATURE is used to identify SQL statements that are
          identical except for their use of literals.
    -> Please refer to the Oracle Database Reference to understand how
          the FORCE_MATCHING_SIGNATURE is derived.
                                         # of Sampled
    FORCE_MATCHING_SIGNATURE % Activity SQL Versions
    Example SQL 1
    Example SQL 2
          1021017294885722791       2.89          218
    0htvt0stu1vtq
    SELECT COUNT(*) FROM "/BIC/FZ99IC003" WHERE "KEY_Z99IC003P" = :A0
    0htvt0stu1vtq
    Top Parsing Module/Action           DB/Inst: dbp/dbp1  (Feb 08 09:30 to 10:20)
    Module                         Action                           % Activ Event
    CL_SQL_STATEMENT============== 383                                67.25 library
                                   383                                      cursor:
                                   383                                      CPU + Wa
    Top Sessions running PQs            DB/Inst: dbp/dbp1  (Feb 08 09:30 to 10:20)
    -> This section aggregates all the work done by the PQ slaves into
          the session issuing the parallel query.
    Sid,Srl# (Inst) % Activity SQL ID        Event                          % Event
    User                 Program
      1506,   19(1)      33.57 350v06jcnd822 library cache lock               19.15
    UserID:
    SELECT "DT"."SID_0CALMONTH" AS "S____048" ,"D3"."SID_0MATERIAL" AS "S____006" ,
    "DU"."SID_0UNIT" AS "S____023" ,"DT"."SID_0CALDAY" AS "S____021" ,"D2"."SID_0MET
    YPE" AS "S____1342" ,"D2"."SID_0VTYPE" AS "S____504" ,"X33"."S__Z99GRMAT" AS "S_
    ___4443" , SUM ( "F"."QUANTITY" ) AS "Z____1299" , COUNT( * ) AS "Z____016"
                                             cursor: pin S wait on X          12.76
    SELECT "DT"."SID_0CALMONTH" AS "S____048" ,"D3"."SID_0MATERIAL" AS "S____006" ,
    "DU"."SID_0UNIT" AS "S____023" ,"DT"."SID_0CALDAY" AS "S____021" ,"D2"."SID_0MET
    YPE" AS "S____1342" ,"D2"."SID_0VTYPE" AS "S____504" ,"X33"."S__Z99GRMAT" AS "S_
    ___4443" , SUM ( "F"."QUANTITY" ) AS "Z____1299" , COUNT( * ) AS "Z____016"
                                             CPU + Wait for CPU                1.61
    SELECT "DT"."SID_0CALMONTH" AS "S____048" ,"D3"."SID_0MATERIAL" AS "S____006" ,
    "DU"."SID_0UNIT" AS "S____023" ,"DT"."SID_0CALDAY" AS "S____021" ,"D2"."SID_0MET
    YPE" AS "S____1342" ,"D2"."SID_0VTYPE" AS "S____504" ,"X33"."S__Z99GRMAT" AS "S_
    ___4443" , SUM ( "F"."QUANTITY" ) AS "Z____1299" , COUNT( * ) AS "Z____016"
      2255, 1067(1)      31.78 48unmtd983uz6 library cache lock               24.37
    UserID:
    SELECT "DT"."SID_0CALDAY" AS "S____021" ,"DT"."SID_0CALMONTH" AS "S____048" ,"D
    3"."SID_0MATERIAL" AS "S____006" ,"DU"."SID_0UNIT" AS "S____023" ,"D2"."SID_0MET
    YPE" AS "S____1342" ,"D2"."SID_0VTYPE" AS "S____504" , SUM ( "F"."QUANTITY" )
    AS "Z____1299" , COUNT( * ) AS "Z____016" FROM "/BIC/FZ99IC114" "F" JOIN "/BIC
                                             cursor: pin S wait on X           5.85
    SELECT "DT"."SID_0CALDAY" AS "S____021" ,"DT"."SID_0CALMONTH" AS "S____048" ,"D
    3"."SID_0MATERIAL" AS "S____006" ,"DU"."SID_0UNIT" AS "S____023" ,"D2"."SID_0MET
    YPE" AS "S____1342" ,"D2"."SID_0VTYPE" AS "S____504" , SUM ( "F"."QUANTITY" )
    AS "Z____1299" , COUNT( * ) AS "Z____016" FROM "/BIC/FZ99IC114" "F" JOIN "/BIC
                                             CPU + Wait for CPU                1.51
    SELECT "DT"."SID_0CALDAY" AS "S____021" ,"DT"."SID_0CALMONTH" AS "S____048" ,"D
    3"."SID_0MATERIAL" AS "S____006" ,"DU"."SID_0UNIT" AS "S____023" ,"D2"."SID_0MET
    YPE" AS "S____1342" ,"D2"."SID_0VTYPE" AS "S____504" , SUM ( "F"."QUANTITY" )
    AS "Z____1299" , COUNT( * ) AS "Z____016" FROM "/BIC/FZ99IC114" "F" JOIN "/BIC
    Top DB Objects                      DB/Inst: dbp/dbp1  (Feb 08 09:30 to 10:20)
    -> With respect to Application, Cluster, User I/O and buffer busy waits only.
          Object ID % Activity Event                             % Event
    Object Name (Type)                                    Tablespace
           13661539       2.45 gc buffer busy acquire               0.87
    SAPSR3./BIC/EZ99IC013 (TABLE)                         PSAPSR3SSD
    Top DB Files                        DB/Inst: dbp/dbp1  (Feb 08 09:30 to 10:20)
    -> With respect to Cluster and User I/O events only.
            File ID % Activity Event                             % Event
    File Name                                             Tablespace
                 53       3.60 gc current block 2-way               0.98
    +dbp_DATA/dbp_2/datafile/psapsr3ssd.315.805562113     PSAPSR3SSD
    Top Latches                         DB/Inst: dbp/dbp1  (Feb 08 09:30 to 10:20)
                      No data exists for this section of the report.
    Activity Over Time                  DB/Inst: dbp/dbp1  (Feb 08 09:30 to 10:20)
    -> Analysis period is divided into smaller time slots
    -> Top 3 events are reported in each of those slots
    -> 'Slot Count' shows the number of ASH samples in that slot
    -> 'Event Count' shows the number of ASH samples waiting for
       that event in that slot
    -> '% Event' is 'Event Count' over all ASH samples in the analysis period
                             Slot                                   Event
    Slot Time (Duration)    Count Event                             Count % Event
    09:30:00   (5.0 min)      260 gc buffer busy acquire               43    0.43
                                  reliable message                     34    0.34
                                  CPU + Wait for CPU                   29    0.29
    09:35:00   (5.0 min)      303 CPU + Wait for CPU                   76    0.75
                                  db file sequential read              40    0.40
                                  gc buffer busy acquire               39    0.39
    09:40:00   (5.0 min)      366 CPU + Wait for CPU                  209    2.08
                                  db file sequential read              26    0.26
                                  gc current block 2-way               22    0.22
    09:45:00   (5.0 min)      511 CPU + Wait for CPU                  249    2.47
                                  cursor: pin S wait on X              93    0.92
                                  reliable message                     45    0.45
    09:50:00   (5.0 min)    2,245 cursor: pin S wait on X           1,442   14.32
                                  library cache lock                  407    4.04
                                  reliable message                    112    1.11
    09:55:00   (5.0 min)    2,037 library cache lock                1,378   13.69
                                  cursor: pin S wait on X             297    2.95
                                  CPU + Wait for CPU                  125    1.24
    10:00:00   (5.0 min)    1,823 library cache lock                1,371   13.62
                                  CPU + Wait for CPU                  263    2.61
                                  reliable message                     72    0.72
    10:05:00   (5.0 min)    1,273 library cache lock                  866    8.60
                                  CPU + Wait for CPU                  155    1.54
                                  reliable message                     96    0.95
    10:10:00   (5.0 min)      798 library cache lock                  350    3.48
                                  CPU + Wait for CPU                  287    2.85
                                  reliable message                     54    0.54
    10:15:00   (5.0 min)      436 CPU + Wait for CPU                  200    1.99
                                  reliable message                     61    0.61
                                  enq: KO - fast object checkpoi       42    0.42
              -------------------------------------------------------------Problems are always on instance 1.
    The queries are different each day, the top sql with performance problem changes the sql_id and I cant attack them or apply a sql profile or tune them because they only execute during a period.
    Any idea?
    :(

  • Wait events tuning

    Hello SAP Community,
    I start by mentioning a few details about the system I'll be talking about in this subject:
    - SAP NetWeaver 7.0
    - Oracle Database 10.2g
    I was reading the following Note: "Note 618868 - FAQ: Oracle performance", in order to try to understand what's causing the oracle database to have slow performance.
    While reading section 3 "How can I determine whether the general database performance can be optimized?" I found out that the ratio of "Busy wait time to CPU time" is away above the recommended 60:40 value. I'm getting a 94:6 ratio. This value was calculated using the query:
    SELECT
      ROUND((STM1.VALUE - STM2.VALUE) / 1000000) "BUSY WAIT TIME (S)",
      ROUND(STM2.VALUE / 1000000) "CPU TIME (S)",
      ROUND((STM1.VALUE - STM2.VALUE) / STM1.VALUE * 100) || ' : ' ||
        ROUND(STM2.VALUE / STM1.VALUE * 100) RATIO
    FROM V$SYS_TIME_MODEL STM1, V$SYS_TIME_MODEL STM2
    WHERE STM1.STAT_NAME = 'DB time' AND STM2.STAT_NAME = 'DB CPU';
    With such high values, SAP recommends to improve system performance doing some "wait event tuning".
    Can someone give me some directions about this subject? Some guides specific to this subject would be nice. Any further information about my system you may require, please ask me.
    Thanks in advance.
    Best regards,
    Daniel Garrido

    Hello again,
    Before I did any changes to the Oracle's parameters I checked the Note 619188 - FAQ: Oracle wait events, to understand what could be causing such high event wait time.
    With the query:
    SELECT EVENT, TOTAL_WAITS, TIME_WAITED, AVG_MS,
    ROUND(RATIO_TO_REPORT(TIME_WAITED) OVER () * 100) PERCENT
    FROM (SELECT SUBSTR(EVENT, 1, 30) EVENT, TOTAL_WAITS, TIME_WAITED,
    ROUND(TIME_WAITED_MICRO / TOTAL_WAITS / 1000, 2) AVG_MS
    FROM V$SYSTEM_EVENT
    WHERE WAIT_CLASS NOT IN ('Idle', 'System I/O')
    UNION
    SELECT 'CPU' EVENT, NULL, VALUE, NULL
    FROM V$SYSSTAT
    WHERE STATISTIC# = 12
    ORDER BY 3 DESC)
    WHERE ROWNUM <=10;
    I got the non-idle events that took more time in my system and the result was:
    Result of the SELECT statement
    EVENT
    TOTAL_WAITS
    TIME_WAITED
    AVG_MS
    PERCENT
    log file switch (archiving nee
    578.686
    57.850.863
    999.69
    80
    buffer busy waits
    712.163
    6.420.932
    90.16
    9
    CPU
    0
    2.791.238
    4
    db file sequential read
    4.005.546
    1.746.442
    4.36
    2
    log file sync
    10.176.490
    1.577.177
    1.55
    2
    enq: TX - row lock contention
    854.451
    642.955
    7.52
    1
    db file scattered read
    1.055.533
    621.332
    5.89
    1
    enq: CF - contention
    210.085
    246.910
    11.75
    0
    read by other session
    561.558
    119.910
    2.14
    0
    log file switch completion
    10.777
    85.843
    79.65
    0
    So most of the TIME_WAITED for wait events was because of the "log file switch (archiving needed)", after reading what could cause such wait event, I understood this was related with a problem I previously had in the server, where the archiving folder was with no space left. (Meanwhile the backup of the archives is being done and so the folder is being cleaned on a daily basis).
    Thank you all for your help!

  • Interpret DB CPUwait event (top 5 wait event AWR)

    Hi,
    Can anyone tell me how to read the table below especially the "DB CPU" section,
    Is it right to say that 41.71% of time was consumed waiting for CPU?? this is urgent
    Event                     Waits           Time(s)      Avg wait (ms)      % DB time      Wait Class
    db file sequential read      300,835      1,483           5           58.42           User I/O
    DB CPU                     1,059                     41.71
    reliable message           9,499           18           2           0.71           Other
    PX Deq: Slave Session Stats      6,506           11           2           0.43           Other
    gc cr grant 2-way           26,218           6           0           0.25           Cluster

    user589420 wrote:
    Hi,
    Can anyone tell me how to read the table below especially the "DB CPU" section,
    Is it right to say that 41.71% of time was consumed waiting for CPU?? this is urgent
    Event                           Waits  Time(s)  Avg wait (ms)  % DB time  Wait Class
    db file sequential read       300,835    1,483              5      58.42  User I/O
    DB CPU                                   1,059                     41.71
    reliable message                9,499       18              2       0.71  Other
    PX Deq: Slave Session Stats     6,506       11              2       0.43  Other
    gc cr grant 2-way              26,218        6              0       0.25  Cluster
    When posting information to the forum that includes critical spaces, like the above, use a { code } tag (without spaces) before and after the information.
    I do not understand why this question is an urgent problem.
    It is incorrect to state that 41.71% of the time was consumed waiting for the CPU. When an Oracle process is running on the CPU, it is officially not waiting. It causes a bit of confusion having the CPU time consumed listed among the top 5 wait events, but as long as you understand why it is in the top 5 list, it almost makes sense for it to be included.
    The DB CPU statistic is listed as 1,059 seconds. If the duration of this report is 1 hour, that is 3,600 seconds of total time. If there is a single CPU in the server, there are 3,600 CPU seconds available in the time period, indicating that the server's CPU on average was 29.4% busy. If there were 12 CPUs in the server, there were 43,200 CPU seconds available in the time period, indicating that on average the CPUs were 2.5% busy. Does this mean that there was a problem, or was this OK, or is there not enough information? Just because on average the CPUs are not busy, that does not mean that there were not periods of intense CPU competion, where in fact there was a temporary shortage of available CPU time for processing.
    The DB Time statistic is supposed to be an indication of work performed by the instance on behalf of the user sessions. It is the accumulation of CPU time consumed by foreground sessions plus the accumulated sum of all non-idle wait events consumed by foreground sessions. Blog articles that might be of interest to you:
    http://hoopercharles.wordpress.com/2010/01/13/working-with-oracle-time-model-data/
    http://hoopercharles.wordpress.com/2010/02/05/faulty-quotes-6-cpu-utilization/
    Charles Hooper
    Co-author of "Expert Oracle Practices: Oracle Database Administration from the Oak Table"
    http://hoopercharles.wordpress.com/
    IT Manager/Oracle DBA
    K&M Machine-Fabricating, Inc.

  • Read by other session wait event

    I have some reports in my database that whenever executed by two or more session these reports suffers with read by other session wait event. Tables which are involving in that's query i moves them to other tablespace and then move back to original tablespace. Some how this could solves read by other session wait event. But after some days these problem occur again.
    How can i permanently solve this problem??
    My db is Oracle Database 10g Enterprise Edition Release 10.2.0.3.0 - Prod
    Oracle Block size 4096
    Thanks

    Hi there,
    Searching for this wait eventin the docs gave this,
    http://download.oracle.com/docs/cd/B19306_01/server.102/b14237/waitevents003.htm#sthref3159
    read by other session
    This event occurs when a session requests a buffer that is currently being read into the buffer cache by another session. Prior to release 10.1, waits for this event were grouped with the other reasons for waiting for buffers under the 'buffer busy wait' event
    Wait Time: Time waited for the buffer to be read by the other session (in microseconds)And a quick google search for the same gave these results in the top.
    http://www.confio.com/English/Tips/Read_By_Other_Session.php
    http://www.dbafan.com/blog/?p=132
    HTH
    Aman....

Maybe you are looking for