Awr questions

Hi,
I have some questions related to AWR:
1) In AWR there is a section on "SQL ordered by Sharable Memory" . I am not clear what is the meaning of sqls ordered by sharable memory? and and how that information could be used for a tuning oppertunity?
2) in the SQL Statistics section of AWR, several sqls are listed under each group (e.g. for sqls ordered by elapsed time, ordered by cpu time etc). Is there a rule that how many sqls will be listed there? I mean say under teh sqls ordered by elapse time category how many sql statements will be listed? In one AWR report I found 16 statements under this category. Now in same AWR report, under "SQL ordered by Reads" category I found 10 statements listed (not 16). So what is the rule? How many statements will be listed by Oracle in the AWR for each of the category?
3) Under "instance activity" section lots of stats are given. Are these stats cumulative since the database startup or they are for the snapshot period for which the AWR report is taken? -I think that the stats should be for the snapshot period, not cumulative but want to confirm if my understanding is correct.
Thanks

What i belive about the query tuning i always start from using Bind Variables.
But if your query is very resource intensive try writing the query in some other manner .
Is your query is using view also if yes check the view if it is meargable or non mergable.
Try to investigate your execution plan for the query and. tune it.
As far as a full table scan is concerned it depends on the selectivity part of your sql query
if the sql is returning high numbers of rows then . it is optimal way to do the operation by
a full table scan.
the best way to tune your sql is to generate the plan output from the trace file of the session
by using the tkprof utility.
sql> alter session set sql_trace=true;
sql>------------do your work...
sql> alter session set sql_trace=false;
then a trace file will be generated in to your udump folder...
which can be analysed for getting the sql execution plan which oracle used
to solve the result.....
Try it if you find some difficulty let me know...
i will help you.
Bi Tc

Similar Messages

  • Question about  Load Average in the AWR report

    Hi,
    I've some database in 11.2 RAC on AIX.
    I was analyzing the root causes of eviction.
    Looking AWR Report before the reboot I see:
    DB1
    Host CPU (CPUs:    6 Cores:    3 Sockets: )
    ~~~~~~~~         Load Average
                   Begin       End     %User   %System      %WIO     %Idle
                    4.18     12.33     60.9      12.6       1.6      26.5
    Instance CPU
    ~~~~~~~~~~~~
                  % of total CPU for Instance:      27.4
                  % of busy  CPU for Instance:      37.3
    %DB time waiting for CPU - Resource Mgr:      10.6
    DB2
    Host CPU (CPUs:    6 Cores:    3 Sockets: )
    ~~~~~~~~         Load Average
                   Begin       End     %User   %System      %WIO     %Idle
                    3.77    13.93     60.7      12.5       1.6      26.7
    Instance CPU
    ~~~~~~~~~~~~
                  % of total CPU for Instance:       6.9
                  % of busy  CPU for Instance:       9.5
      %DB time waiting for CPU - Resource Mgr:       0.0
    Do you think these value ar high?
    This is vmstats at the time of reboot:
    DATA
    RUN
    BCK
    AVM
    FRE
    PRE
    PPI
    PPO
    PFR
    PSR
    PCY
    FIN
    FSY
    FCS
    CUS
    CSY
    CID
    CWA
    07/21/2013
      00:08:17
    31
    0
    7.400.345
    579.923
    0
    81
    0
    0
    0
    0
    3.292
    187.010
    19.560
    84
    16
    0
    0
    07/21/2013
      00:08:17
    17
    1
    7.390.187
    589.884
    0
    176
    0
    0
    0
    0
    3.681
    169.994
    21.482
    81
    19
    0
    0
    07/21/2013
      00:08:17
    27
    1
    7.402.121
    577.816
    0
    115
    0
    0
    0
    0
    3.150
    157.210
    18.503
    84
    16
    0
    0
    07/21/2013
      00:08:48
    19
    1
    7.422.966
    564.179
    0
    211
    0
    0
    0
    0
    2.396
    152.667
    19.368
    84
    16
    0
    0
    07/21/2013
      00:08:48
    19
    1
    7.427.693
    559.268
    0
    162
    0
    0
    0
    0
    2.990
    154.733
    19.843
    85
    15
    0
    0
    07/21/2013
      00:08:48
    23
    1
    7.441.204
    545.530
    0
    204
    0
    0
    0
    0
    2.137
    171.501
    18.151
    84
    16
    0
    0
    This is mpstat:
    DATA
    CPU
    MIN
    MAJ
    MPC
    INT
    CS
    ICS
    RQ
    MIG
    LPA
    SYSC
    US
    SY
    WT
    ID
    PC
    07/21/2013
      00:08:48
    0
    12896
    44
    0
    1279
    3030
    1362
    2
    367
    100
    27313
    86
    14
    0
    0
    0.49
    07/21/2013
      00:08:48
    1
    11055
    93
    0
    1123
    3137
    1315
    1
    222
    100
    31860
    85
    15
    0
    0
    0.51
    07/21/2013
      00:08:48
    2
    5938
    51
    0
    1465
    3840
    1294
    2
    532
    100
    29992
    85
    15
    0
    0
    0.49
    07/21/2013
      00:08:48
    3
    6266
    57
    0
    1247
    3177
    1046
    2
    511
    100
    22793
    85
    15
    0
    0
    0.51
    07/21/2013
      00:08:48
    4
    2661
    18
    0
    1729
    4087
    1707
    4
    264
    100
    24647
    85
    15
    0
    0
    0.49
    07/21/2013
      00:08:48
    5
    4211
    10
    0
    1395
    2709
    1101
    2
    209
    100
    21019
    86
    14
    0
    0
    0.51
    07/21/2013
      00:08:49
    0
    9372
    27
    0
    1150
    2583
    1219
    0
    245
    100
    47745
    82
    18
    0
    0
    0.47
    07/21/2013
      00:08:49
    1
    11327
    13
    0
    726
    1803
    794
    1
    130
    100
    25239
    87
    13
    0
    0
    0.52
    07/21/2013
      00:08:49
    2
    8970
    118
    0
    1459
    4396
    1517
    0
    602
    100
    24833
    81
    19
    0
    0
    0.49
    07/21/2013
      00:08:49
    3
    7328
    267
    0
    1329
    4136
    1273
    2
    586
    100
    25385
    81
    19
    0
    0
    0.51
    07/21/2013
      00:08:49
    4
    8793
    19
    0
    1133
    2583
    1036
    1
    235
    100
    24327
    86
    14
    0
    0
    0.50
    07/21/2013
      00:08:49
    5
    8239
    12
    0
    1309
    2846
    1165
    1
    277
    100
    18513
    86
    14
    0
    0
    0.50
    Thank you

    Thank you Jonathan,
    i'm looking ASH, 15 minutes before the crash.
    I've 13% of buffer busy waits and 13% of cpu quantum
                                                                   Avg Active
    Event                               Event Class        % Event   Sessions
    CPU + Wait for CPU                  CPU                  59.09       0.15
    buffer busy waits                   Concurrency          13.64       0.04
    resmgr:cpu quantum                  Scheduler            13.64       0.04
    The buffer busy waits was caused by an update of a table.
    There are ETL jobs that runs every nigth.
    Looking IO stats I notice a change in the use of the swap:
    before the crash:
    hdisk66        xfer:  %tm_act      bps      tps      bread      bwrtn   
                             1.0      8.2K     2.0        8.2K       0.0
                   read:      rps  avgserv  minserv  maxserv   timeouts      fails
                             2.0      6.7      3.8      9.6           0          0
                  write:      wps  avgserv  minserv  maxserv   timeouts      fails
                             0.0      0.0      0.0      0.0           0          0
                  queue:  avgtime  mintime  maxtime  avgwqsz    avgsqsz     sqfull
                             0.0      0.0      0.0      0.0        0.0         0.0
    near the crash:
    hdisk66        xfer:  %tm_act      bps      tps      bread      bwrtn   
                            71.0    241.7K    59.0      241.7K       0.0
                   read:      rps  avgserv  minserv  maxserv   timeouts      fails
                            59.0     12.1      0.2    183.5           0          0
                  write:      wps  avgserv  minserv  maxserv   timeouts      fails
                             0.0      0.0      0.0      0.0           0          0
                  queue:  avgtime  mintime  maxtime  avgwqsz    avgsqsz     sqfull
                             0.0      0.0      0.0      0.0        0.0         0.0

  • DB CPU event in top 5 of AWR report question

    The top 5 foreground event in my AWR report is as follows. I am trying to understand if my db(system) is CPU bound.The elapsed time is 30 minutes and DB time is 675 in the load profile section. There are 32 cpus. The available CPU is 30*60*32 => 57600. The  DB CPU below is 35227. This is about 61 %. At what percentage of DB CPU do I consider my system is CPU bound ?. Also I want to make sure the method I arrived at this is correct or not. Please help. Event           Waits Time(s) Avg wait (ms) % DB time     Wait Class DB CPU                 35,277 87.12 DBMS_LDAP: LDAP operation 3,683       10,061       366         9.1             Other db file sequential read 233,584         933       4         2.3               User I/O read by other session 41,686           190       5       0.47                 User I/O log file sync 70,932      166       2       0.41                           Commit

    Why does the top 5 foreground indicate 87 % below the  % DB Time  column ? While my calculation shows 61 %, Which is correct for the interpretation if the system is CPU bound. The 2 lines of top 5 events are as follows
    Event
    Waits
    Time(s)
    Avg wait (ms)
    % DB time
    Wait Class
    DB CPU
    35,277
    87.12

  • AWR snapshot question

    Hi:
    I create a snapshot manually use dbms_workload_repository.create_snaphost at 15:51 , then the 16:00 snapshot by system is not generated.
    so have any method can force system execute snapshot on the hour,even I manually snap?
    Edited by: tomykety on May 29, 2013 2:00 AM

    Welcome to the oracle forums!
    Please take some time to go through [url https://forums.oracle.com/forums/ann.jspa?annID=1535]FAQ PAGE
    Always post 4 digit oracle version and OS details.
    Please post the output of DBA_HIST_SNAPSHOT view,this will show what shapshot you have with their begin and end time.
    By default AWR snapshot are taken every hour.

  • Good question on ADDM and AWR

    Just curious to know what is the difference between running *{color:#808000}awrrpt.sql{color}* and *{color:#808000}addmrpt.sql{color}*?
    I could not get right information googling out.
    Thanks for your time!

    1)addmrpt.sql -- Generates "DETAILED ADDM REPORT" which reports findings and gives recommendations about activities impacting the db most. It generates a text file.
    2)awrrpt.sql -- Generates a "WORKLOAD REPOSITORY REPORT" which is like a statspack report. You can generate a html file from this script
    Kev

  • Understanding the AWR report

    Hello,
    Just to start off on the right path I would like you to know that I am a Java developer trying to understand the AWR report. To give a quick overview of my problem :
    I have built a load test framework using JMeter and trying to send SOAP requests to my weblogic server. Each of these requests are getting converted multiple Insert, Update and Merge statements and getting executed on the Oracle 10g productions grade DB server. When I run the AWR report, under the "SQL ordered by Executions (Global)" I see statements that have run for 2 billion times. The JDBC connection to the database is configured to have a maximum of 40 connections and I do not see all of them being used up. The issue now is I am NOT generating that kind of load yet. I am creating around 15000 SOAP requests in an hour and I am expecting around 1million records to hit the database. The test runs fine for a couple of hours and then the server starts failing because the database is not responding back properly. When I run the statistics query on tables "gv$session s, gv$sqlarea t, gv$process p" to get the pending sessions in the database I have seen anywhere between 30 - 62 pending sessions with a activity time of more than 300 minutes.
    I am sure I am not sending in 2 billion requests from the LoadTest env that I have developed but the AWR report says so. I want to know if there is a possible reason for this behavior. The stuck threads start occurring on the Weblogic server after 30 mins I start the test. Below is the exception I got on weblogic just in case it helps
    2014-10-06 19:26:04,960[[STUCK] ExecuteThread: '1' for queue: 'weblogic.kernel.Default (self-tuning)']ERROR DAOUtil -- DAOUtil@SQLException > weblogic.jdbc.extensions.ConnectionDeadSQLException: weblogic.common.resourcepool.ResourceDeadException: Could not create pool connection. The DBMS driver exception was: Closed Connection
        at weblogic.jdbc.common.internal.JDBCUtil.wrapAndThrowResourceException(JDBCUtil.java:249)
        at weblogic.jdbc.pool.Driver.connect(Driver.java:160)
        at weblogic.jdbc.jts.Driver.getNonTxConnection(Driver.java:642)
        at weblogic.jdbc.jts.Driver.connect(Driver.java:124)
        at weblogic.jdbc.common.internal.RmiDataSource.getConnection(RmiDataSource.java:338)
        at com.bci.rms.ea.common.eautil.dao.DAOUtil.getConnectionFromDataSource(DAOUtil.java:222)
    Looking forward for reply/questions...
    Thanks in Advance,
    Sameer.

    Hello,
    Just to start off on the right path I would like you to know that I am a Java developer trying to understand the AWR report. To give a quick overview of my problem :
    I have built a load test framework using JMeter and trying to send SOAP requests to my weblogic server. Each of these requests are getting converted multiple Insert, Update and Merge statements and getting executed on the Oracle 10g productions grade DB server. When I run the AWR report, under the "SQL ordered by Executions (Global)" I see statements that have run for 2 billion times. The JDBC connection to the database is configured to have a maximum of 40 connections and I do not see all of them being used up. The issue now is I am NOT generating that kind of load yet. I am creating around 15000 SOAP requests in an hour and I am expecting around 1million records to hit the database. The test runs fine for a couple of hours and then the server starts failing because the database is not responding back properly. When I run the statistics query on tables "gv$session s, gv$sqlarea t, gv$process p" to get the pending sessions in the database I have seen anywhere between 30 - 62 pending sessions with a activity time of more than 300 minutes.
    I am sure I am not sending in 2 billion requests from the LoadTest env that I have developed but the AWR report says so. I want to know if there is a possible reason for this behavior. The stuck threads start occurring on the Weblogic server after 30 mins I start the test. Below is the exception I got on weblogic just in case it helps
    2014-10-06 19:26:04,960[[STUCK] ExecuteThread: '1' for queue: 'weblogic.kernel.Default (self-tuning)']ERROR DAOUtil -- DAOUtil@SQLException > weblogic.jdbc.extensions.ConnectionDeadSQLException: weblogic.common.resourcepool.ResourceDeadException: Could not create pool connection. The DBMS driver exception was: Closed Connection
        at weblogic.jdbc.common.internal.JDBCUtil.wrapAndThrowResourceException(JDBCUtil.java:249)
        at weblogic.jdbc.pool.Driver.connect(Driver.java:160)
        at weblogic.jdbc.jts.Driver.getNonTxConnection(Driver.java:642)
        at weblogic.jdbc.jts.Driver.connect(Driver.java:124)
        at weblogic.jdbc.common.internal.RmiDataSource.getConnection(RmiDataSource.java:338)
        at com.bci.rms.ea.common.eautil.dao.DAOUtil.getConnectionFromDataSource(DAOUtil.java:222)
    Looking forward for reply/questions...
    Thanks in Advance,
    Sameer.

  • High library cache load lock waits in AWR

    Hi All,
    Today i faced a significant performance problem related to shared pool. I made some observations, thought it would be a nice idea to share them with Oracle experts. Please feel free to add your observations/recommendations and correct me where i am wrong.
    Here are the excerpts from AWR report created for the problem timing. Database server is on 10.2.0.3 and running with 2*16 configuration. DB cache size is 4,000M and shared pool size is of 3008M.
    Snap Id Snap Time Sessions Cursors/Session
    Begin Snap: 9994 29-Jun-09 10:00:07 672 66.3
    End Snap: 10001 29-Jun-09 17:00:49 651 64.4
    Elapsed:   420.70 (mins)    
    DB Time:   4,045.34 (mins)   -- Very poor response time visible from difference between DB time and elapsed time.
    Load Profile
    Per Second Per Transaction
    Redo size: 248,954.70 23,511.82
    Logical reads: 116,107.04 10,965.40
    Block changes: 1,357.13 128.17
    Physical reads: 125.49 11.85
    Physical writes: 51.49 4.86
    User calls: 224.69 21.22
    Parses: 235.22 22.21
    Hard parses: 4.83 0.46
    Sorts: 102.94 9.72
    Logons: 1.12 0.11
    Executes: 821.11 77.55
    Transactions: 10.59   -- User calls and Parse count are almost same, means most of the calls are for parse. Most of the parses are soft. Per transaction 22 parses are very high figure.
    -- Not much disk I/O activity. Most of the reads are being satisfy from memory.
    Instance Efficiency
    Buffer Nowait %: 100.00 Redo NoWait %: 100.00
    Buffer Hit %: 99.92 In-memory Sort %: 100.00
    Library Hit %: 98.92 Soft Parse %: 97.95
    Execute to Parse %: 71.35 Latch Hit %: 99.98
    Parse CPU to Parse Elapsd %: 16.82 % Non-Parse CPU: 91.41 -- Low execute to parse ratio denotes CPU is significantly busy in parsing. Soft Parse% showing, most of the parse are soft parses. It means we should concentrate on soft parsing activity.
    -- Parse CPU to Parse Elapsed % is quite low, means some bottleneck is there related to parsing. It could be a side-effect of huge parsing pressure. Like CPU cycles are not available.
    Shared Pool Statistics
    Begin End
    Memory Usage %: 81.01 81.92
    % SQL with executions>1: 88.51 86.93
    % Memory for SQL w/exec>1: 86.16 86.76 -- Shared Pool memory seems ok (in 80% range)
    -- 88% of the SQLs are repeating ones. It's a good sign.
    Top 5 Timed Events
    Event Waits Time(s) Avg Wait(ms) % Total Call Time Wait Class
    library cache load lock 24,243 64,286 2,652 26.5 Concurrency
    db file sequential read 1,580,769 42,267 27 17.4 User I/O
    CPU time   33,039   13.6  
    latch: library cache 53,013 29,194 551 12.0 Concurrency
    db file scattered read 151,669 13,550 89 5.6 User I/O Problem-1: Contention on Library cache: May be due to under-sized shared pool, incorrect parameters, poor application design, But since we already observed that most of the parses are soft parses and shared pool usgae in 80%, seems problem related to holding cursors. open_cursors/session_cached_cursors are red flags.
    Problem-2: User I/O, may be due to poor SQLs, I/O sub-system, or poor physical design (wrong indexes are being used as DB file seq reads)
    Wait Class
    Wait Class Waits %Time -outs Total Wait Time (s) Avg wait (ms) Waits /txn
    Concurrency 170,577 44.58 109,020 639 0.64
    User I/O 2,001,978 0.00 59,662 30 7.49
    System I/O 564,771 0.00 8,069 14 2.11
    Application 145,106 1.25 6,352 44 0.54
    Commit 176,671 0.37 4,528 26 0.66
    Other 27,557 6.31 2,532 92 0.10
    Network 6,862,704 0.00 696 0 25.68
    Configuration 3,858 3.71 141 37 0.01
    Wait Events
    Event Waits %Time -outs Total Wait Time (s) Avg wait (ms) Waits /txn
    library cache load lock 24,243 83.95 64,286 2652 0.09
    db file sequential read 1,580,769 0.00 42,267 27 5.91
    latch: library cache 53,013 0.00 29,194 551 0.20
    db file scattered read 151,669 0.00 13,550 89 0.57
    latch: shared pool 25,403 0.00 12,969 511 0.10
    log file sync 176,671 0.37 4,528 26 0.66
    enq: TM - contention 1,455 90.93 3,975 2732 0.01 Instance Activity Stats
    opened cursors cumulative 5,290,760 209.60 19.80
    parse count (failures) 6,181 0.24 0.02
    parse count (hard) 121,841 4.83 0.46
    parse count (total) 5,937,336 235.22 22.21
    parse time cpu 283,787 11.24 1.06
    parse time elapsed 1,687,096 66.84 6.31 Latch Activity
    library cache 85,042,375 0.15 0.43 29194 304,831 7.16
    library cache load lock 257,089 0.00 1.20 0 69,065 0.00
    library cache lock 41,467,300 0.02 0.07 6 2,714 0.07
    library cache lock allocation 730,422 0.00 0.44 0 0  
    library cache pin 28,453,986 0.01 0.16 8 167 0.00
    library cache pin allocation 509,000 0.00 0.38 0 0 Init.ora parameters
    cursor_sharing= EXACT
    open_cursors= 3000
    session_cached_cursors= 0
    -- open_cursors value is too high. I have checked that maximum usage by a single session is 12%.
    -- session_cached_cursors are 0 causing soft parsing. 500/600 is good number to start with.
    cursor_sharing exact may cause hard parses. But here, hard parsing is comparatively small, we can ignore this.
    From v$librarycache
    NAMESPACE             GETS    GETHITS GETHITRATIO       PINS PINHITRATIO    RELOADS INVALIDATIONS
    SQL AREA            162827      25127  .154317159  748901435  .999153087     107941         81886-- high invalidation count due to DDL like activities.
    -- high reloads due to small library cache.
    -- hit ratio too small.
    -- Need to pin frequently executed objects into library cache.
    P.S. Same question asked on Oracle_L, but due to formatting reasons, pasing duplicate contents here.
    Regards,
    Neeraj Bhatia
    Edited by: Neeraj.Bhatia2 on Jul 13, 2009 6:51 AM                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               

    Thanks Charles. I really appreciate your efforts to diagnose the issue.
    I agree with you performance issue is caused by soft parsing, which can be solved by holding cursors (session_cached_cursors). It may be due to oversized shared pool, which is causing delay in searching child cursors.
    My second thought is, there is large number of reloads, which can be due to under-sized shared pool, if invalidation activities are not going (CBO statistics collection, DDL etc), cursors are being flushed frequently.
    CPU utilization is continuously high (above 90%). Pasting additional information from same AWR report.
    Namespace                Get Requests       Pct Miss        Pin Requests         Pct Miss      Reloads        Invalidations
    BODY                       225,345               0.76            4,965,541            0.15           5,533           0
    CLUSTER                   1,278                  1.41            2,542                  1.73           26                0
    INDEX                       5,982                  9.31            13,922                7.35           258               0
    SQL AREA                  141,465              54.10           27,831,235         1.21           69,863          19,085 Latch Miss Sources
    Latch Name             Where                                         NoWait Misses                 Sleeps             Waiter Sleeps
    library cache lock       kgllkdl: child: no lock handle             0                                   8,250                   5,792 Time Model Statistics
    Statistic Name                                                                           Time (s)                               % of DB Time
    sql execute elapsed time                                                           206,979.31                                      85.27
    PL/SQL execution elapsed time                                                    94,651.78                                      39.00
    DB CPU                                                                                     33,039.29                                      13.61
    parse time elapsed                                                                      22,635.47                                       9.33
    inbound PL/SQL rpc elapsed time                                                  14,763.48                                       6.08
    hard parse elapsed time                                                               14,136.77                                       5.82
    connection management call elapsed time                                        1,625.07                                       0.67
    PL/SQL compilation elapsed time                                                        760.76                                       0.31
    repeated bind elapsed time                                                               664.81                                       0.27
    hard parse (sharing criteria) elapsed time                                             500.11                                       0.21
    Java execution elapsed time                                                              252.95                                       0.10
    failed parse elapsed time                                                                   167.23                                       0.07
    hard parse (bind mismatch) elapsed time                                             124.11                                       0.05
    sequence load elapsed time                                                                23.34                                        0.01
    DB time                                                                                   242,720.12  
    background elapsed time                                                             11,645.52  
    background cpu time                                                                      247.25 According to this DB CPU is 65% utilization (DB CPU + Background CPU / Total Available CPU seconds). While at the same time DB host was 95% utilized (confirmed from DBA_HIST_SYSMETRIC_SUMMARY).
    Operating System Statistics
    Statistic                                         Total
    BUSY_TIME                             3,586,030
    IDLE_TIME                              1,545,064
    IOWAIT_TIME                              22,237
    NICE_TIME                                           0
    SYS_TIME                                  197,661
    USER_TIME                              3,319,452
    LOAD                                                 11
    RSRC_MGR_CPU_WAIT_TIME                  0
    PHYSICAL_MEMORY_BYTES          867,180
    NUM_CPUS                                           2

  • AWR reports DBMS_ALERT_INFO queries using significant elapsed time

    Hi
    10.1.0.3 / OpenVMS 8.2
    Has anyone encountered AWR reporting significant resource consumption on queries relating to DBMS_ALERT_INFO (via calls to dbms_alert.register)? The buffer busy waits % from AWR is high as well (see AWR snippets below). Oracle are suggesting this is "expected behaviour for the objects owned by
    the SYS user".
    The query takes (on average) 2.3 seconds elapsed, using 1.63 CPU seconds and is responsible for 94% of all Buffer Busy Waits.
    Elapsed CPU Elap per % Total
    Time (s) Time (s) Executions Exec (s) DB Time SQL Id
    10,965 7,746 4,756 2.3 4.7 57w71dgk5qbtx
    Module: DSA103:[CSC_ENV_1.APPLIC.][SPICE.LIB]SPC_PFS1_MA
    SELECT DISTINCT SUBSTR(KGLNAOBJ,11) SID FROM X$KGLOB WHERE KGLHDNSP = 7 AND KGLN
    AOBJ LIKE 'ORA$ALERT$%' AND BITAND(KGLHDFLG,128)!=0 UNION SELECT DISTINCT SID FR
    OM DBMS_ALERT_INFO
    Segments by Buffer Busy Waits DB/Inst: SPICE/ONLINE Snaps: 4930-5026
    Buffer
    Tablespace Subobject Obj. Busy
    Owner Name Object Name Name Type Waits %Total
    SYS SYSTEM DBMS_ALERT_INFO TABLE 130,626 93.76
    Clive

    Christophe Lize wrote:
    Closing this thread even if it's not answered...Sorry, I don't have time to test this myself now, but you shouldn't mark this thread as answered if it is not, because other people might find it and think they find an answer if they have a similar question.
    I suggest you try the following to narrow down things:
    1. Open the RAW trace file and check the cursor numbers of the "direct path reads" - check if you can find any references for those cursor numbers manually. The cursor numbers are those numbers behind the WAIT #<xx>, and you can check if you find any other entry unequal to WAIT #<xx> with the same #<xx>, for example EXEC #<xx> or FETCH #<xx>
    A short primer on how to interpret the raw trace file can also be found in MOS document 39817.1
    2. Run the RAW trace file through alternative free trace file analyzers like SQLDeveloper (yes it can process raw trace files), OraSRP or Christian Antognini's TVD$XTAT. If you have My Oracle Support access you can also try Oracle's own extended Trace Analyzer (TRCA / TRCANLZR). See MOS Note 224270.1
    Check if these tools tell you more about your specific wait event and oddities with the trace file in general.
    Regards,
    Randolf
    Oracle related stuff blog:
    http://oracle-randolf.blogspot.com/
    Co-author of the "OakTable Expert Oracle Practices" book:
    http://www.apress.com/book/view/1430226684
    http://www.amazon.com/Expert-Oracle-Practices-Database-Administration/dp/1430226684

  • Oracle 11G - Oracle AWR query execution time in report

    I have used AWR tool of oracle 11G. I have exported query historical statistics of production databaser using awrextr.sql and then load the exported dump file using awrload.sql script.
    Then i used awrrpti.sql and awrsqrpi.sql for generating report of sql queries. Every thing is working fine and generated reports are also very helpful, but report does not show the exact time when the query was executed. How can i get the actual time when the query was executed ?
    any help please ?

    If you would have consulted the Oracle Reference Manual to get the view descriptions, you should have your question is a rhetorical one with the answer NO.
    This is because every statement can be executed one or more times, and Oracle would need to keep track of all individual executions.
    I do agree most 'applications' do not use bind variables, and consequently only have unique statements, but Oracle didn't take that into account, and rightly so.
    Sybrand Bakker
    Senior Oracle DBA

  • Steps to generate AWR report from Oracle 11g OEM

    I have gone through online documentation for generating an AWR report from Oracle 11g OEM but the documentation is more focused on generating the AWR report manually. I would request if there is a link or documentation to go through for generating AWR report from Oracle 11g enterprise manager.
    I hope my question is clear.
    Please revert with the reply to my query.
    Regards

    HI ,
    Please check following link: Siva Oracle: How to generate AWR Report from OEM Grid
    Thank you

  • AMM Shrink and grow question

    Hi,
    i've 11.2 Database.
    I know that using AMM, Oracle manages sga and pga together.
    But why shink and grow (sga pools) operation impact only shared and buffer and not also the pga?
    An example, I've 5Gb of AMM, looking AWR, Oracle set shared pool to about 1,9Gb, buffer to 1,1Gb (sga target around 3,3Gb) and the results to PGA.
    Looking Memory Dynamic Components in AWR, i see that shrink/grow operation uses only shared and buffer pool and not the PGA that is not used.
    Why this?
    Thanks.

    Mr.D. wrote:
    Hi,
    i've 11.2 Database.
    I know that using AMM, Oracle manages sga and pga together.
    But why shink and grow (sga pools) operation impact only shared and buffer and not also the pga?
    An example, I've 5Gb of AMM, looking AWR, Oracle set shared pool to about 1,9Gb, buffer to 1,1Gb (sga target around 3,3Gb) and the results to PGA.
    Looking Memory Dynamic Components in AWR, i see that shrink/grow operation uses only shared and buffer pool and not the PGA that is not used.
    Why this?
    Thanks.What I understood from your question is that you dont see reallocation of PGA as you see in SGA resizable components.
    [url http://docs.oracle.com/cd/B28359_01/server.111/b28310/memory003.htm] this  describes how the PGA is allocated.
    Unless there is pressure on oracle to release the memory from PGA to allocate to SGA or vice versa you will not see the change in memory allocation for PGA

  • How Far Back Oracle Keep AWR Reports

    Hello,
    A quick question:
    Does anyone know how far back Oracle retain AWR reports in the database? Is this something that we can customize? If it is, can someone offer some insights?
    Thanks!

    The default settings for 'interval' and 'retention' are (60 min and 7 days respectively),
    Sample modification using,
    execute dbms_workload_repository.modify_snapshot_settings(interval => 120,retention => 20160);
    the parameter value is in minutes.
    Edited by: Anantha on Jan 15, 2009 12:12 PM
    Metalink notes:
    Space Management In Sysaux Tablespace with AWR in Use - 287679.1
    Usage and Storage Management of SYSAUX tablespace occupants SM/AWR, SM/ADVISOR, SM/OPTSTAT and SM/OTHER - 329984.1

  • Old query taking substantial CPU time in AWR report

    Hi,
    We have a particular query which used to generate substantial CPU wait event in the AWR report.On of our DBA's killed the query some days back but still today's AWR report shows that particular query as the largest CPU consumer (50%). When I checked from the view V$SQL the last execution time was of 23-02-2011.
    My question is after the query gets killed does it still show in the v$SQL ? And why is it still showing in the SQL BY ELAPSED TIME section ?
    Please help.

    No it is a select statement. I AM PASTING THE QUERY BELOW.
    select  /*+ FULL(COMP_TM) FULL(TRANS_TM) FULL(INVC_TM) */
                CUST_BE_ID     ,
                DISTR_BE_ID    ,
                FG_BE_ID         ,
                KIT_BE_ID        ,
                BG_ID_NO_BE_ID         ,
             ACTL_TERR_BE_ID       ,
                CORE_TERR_BE_ID      ,
            sum(     JNJ_LIST_AMT  ) AS JNJ_LIST_AMT,
                sum(     JNJ_PYMT_AMT            )  AS  JNJ_PYMT_AMT,
                sum(     JNJ_QTY           ) AS JNJ_QTY,
                sum(     JNJ_REB_AMT  ) AS JNJ_REB_AMT,
                sum(     JNJ_SLS_AMT  ) AS JNJ_SLS_AMT,
                sum(     KIT_LIST_AMT   ) AS KIT_LIST_AMT,
                sum(     KIT_QTY           ) AS KIT_QTY,
                sum(     KIT_SLS_AMT   ) AS KIT_SLS_AMT,
                sum(     FG_PYMT_AMT            ) AS FG_PYMT_AMT,
                sum(     FG_QTY           ) AS FG_QTY,
                sum(     FG_REB_AMT   ) AS FG_REB_AMT,
                sum(     FG_SLS_AMT   ) AS FG_SLS_AMT,
                sum(     FG_LIST_AMT   ) AS FG_LIST_AMT,
                to_date('15'||substr(COMP_TM.FISC_MO_CD,8,2)||substr(COMP_TM.FISC_MO_CD,3,4),'DDMMYYYY') AS     TRANS_MO_DATE,
                to_number(substr(COMP_TM.FISC_MO_CD,3,4) ) AS PRD_YR_CD, 
                to_number(substr(COMP_TM.FISC_MO_CD,8,2) ) AS PRD_MO_CD, 
                CONTR_PRD_TIER_NO,
                COMP_TM.FISC_MO_OID AS COMP_MO_BE_ID,
                CLSD_YR_FLG,
                ADJM_TRANS_CD,
                INVC_TM.FISC_MO_OID AS INVC_MO_BE_ID,
                ORD_TYP_CD,
                TRANS_TM.FISC_MO_OID AS TRANS_MO_BE_ID
    from
                FACT_DLY_ALGND_SLS F, DIM_TM_MV TRANS_TM,
                DIM_TM_MV INVC_TM, DIM_TM_MV COMP_TM
    /***** comment out for loading historical data....  ***/
    WHERE F.PRD_YR_CD >= (select case when to_number(to_char(sysdate,'MM')) <= 3
                         then to_number(to_char(sysdate,'YYYY'))-1
                               else to_number(to_char(sysdate,'YYYY'))
                               end case from dual
    -- and F.PRD_YR_CD = '2008'
    AND F.COMP_DT_BE_ID=COMP_TM.BE_ID
    AND F.TRANSACTION_DATE = TRANS_TM.DAY_STRT_PRD_OF_TM
    AND TRANS_TM.DAY_OID = TRANS_TM.BE_ID
    AND F.INVC_DT = INVC_TM.DAY_STRT_PRD_OF_TM
    AND INVC_TM.DAY_OID = INVC_TM.BE_ID
    group by
                CUST_BE_ID     ,
                DISTR_BE_ID    ,
                FG_BE_ID         ,
                KIT_BE_ID        ,
                BG_ID_NO_BE_ID         ,
             ACTL_TERR_BE_ID       ,
                CORE_TERR_BE_ID      ,
                to_date('15'||substr(COMP_TM.FISC_MO_CD,8,2)||substr(COMP_TM.FISC_MO_CD,3,4),'DDMMYYYY'),
                to_number(substr(COMP_TM.FISC_MO_CD,3,4) ), 
                to_number(substr(COMP_TM.FISC_MO_CD,8,2) ), 
                CONTR_PRD_TIER_NO,
                COMP_TM.FISC_MO_OID ,
                CLSD_YR_FLG,
                ADJM_TRANS_CD,
                INVC_TM.FISC_MO_OID ,
                ORD_TYP_CD,
                TRANS_TM.FISC_MO_OIDI am wrong in the previous post. Actually the elapsed time in the AWR was showing 840 mins.

  • How to find problematic quries using AWR report

    Hi All,
    Somebody please help me how do I analyze the AWR report to find out problematic quires and the relevant recommendation for it.
    It would be highly appreciable
    Kind Regards
    Shankar

    if youre running AWR means you got enterprise edition with the diagnostic licence pack add on. Substantial investment even in a minimal cpu configuration.
    Reason Im asking is your question is opened ended. Sure you can look at the top consuming SQL statement, but that not might be what needs tuning so you want to waste your time trying to fix things that arent broken?
    Have you got a DBA on site?

  • How to take awr report

    A little confused in generating awr report using awrrpt.sql
    Here are the snapshots we have in the repository.
    8257 13 Nov 2013 02:00 
    1
    8258 13 Nov 2013 02:30 
    1
    8259 13 Nov 2013 03:00 
    1
    8260 13 Nov 2013 03:30 
    1
    8261 13 Nov 2013 04:00 
    1
    8262 13 Nov 2013 04:30 
    1
    And the test run we'd was between 2:15 to 3:45.  which snapshots should we choose as the begin snap ID and end snap ID.
    I got this question when i saw how the snapshots were taken like snap ID 8258
      SNAP_ID BEGIN_INTERVAL_TIME       
    END_INTERVAL_TIME
    8258 13-NOV-13 02.00.19.314 AM 
    13-NOV-13 02.30.23.284 AM
    where i was going to select 8257 as the begin snap ID.
    Which snap IDs makes more sense for the time window of 2:15 to 3:45 ?
    Thanks
    Siva.

    It seems you are confused by BEGIN_INTERVAL_TIME (you can look on this column as orientation for the interval, begin/end) and END_INTERVAL_TIME.
    END_INTERVAL_TIME is the time when the snapshot is taken,
    In your case:
      SNAP_ID BEGIN_INTERVAL_TIME  
    END_INTERVAL_TIME
    8258 13-NOV-13 02.00.19.314 AM
    13-NOV-13 02.30.23.284 AM
    So,
    SNAP_ID = 8258 with BEGIN_INTERVAL_TIME = 02.00.19.314 AM
    If you check previous SNAP_ID = 8257, that snap will have END_INTERVAL_TIME = 02.00.19.314 AM
    Taking a snapshot doesn't last 30 min. If you need to know how much time the database spent to take the snapshot you can query FLUSH_ELAPSED column from DBA_HIST_SNAPSHOT.
    I.Arsov
    Message was edited by: IvicaArsov

Maybe you are looking for

  • How tomaintain product revenue when the oppty is in sales stage Closed/Lost

    When the opportunity is in the closed/lost stage the product revenue is always zero. How can we move the opportunity to closed/lost but still maintain the revenue values for the products. We use the product revenue to report opportunity revenue... th

  • Import in 11g r2 on windows server 2008

    i want to import dumpfile created in oracle 8i into oracle 11g r2 on windows server 2008.. i need the step by step procedures in detail.. can anyone help me?.. thanks in advance...

  • Projecting Ipad Using LCD Projector

    I am in education. I would like to use an iPad in a classroom where i can have what is happening on the iPad screen be projected, using an LCD projector, without using another computer and preferably wirelessly. Can this be done?

  • How can I change my iTunes home library for my iPhone?

    I initially synced my iPhone with my desktop computer's iTunes, and thus that becomes its "home library", and it won't let me sync with any other computer (which is understandable). However, what if I want to change the "home library"? Like if I buy

  • Capture Torque vs Angle readings with multiple DAQ devices simultaneously

    I am trying to capture a torque signal from an NI 9237 and combine it with an angle signal from a PCI 6251 with an SCC-68. It seems that I am able to capture each individually without a problem, but I seem to be getting off on time bases during aquis