大家好:
   我现在想改进数据库性能,做了性能监测,譬如:监控回滚段的争用情况、监控 监控表空间的 I/O 比例等等,根据监测结果,怎么来改进那些性能需要提高或者改变?谢谢!

解决方案 »

  1.   

    这是STATSPACK收集统计信息,如何分析结果,谢谢!
    STATSPACK report forDB Name         DB Id    Instance     Inst Num Release     RAC Host
    ------------ ----------- ------------ -------- ----------- --- ----------------
    SGX            883483403 sgx                 1 10.1.0.2.0  NO  OPPO-ZHANGZZ              Snap Id     Snap Time      Sessions Curs/Sess Comment
                --------- ------------------ -------- --------- -------------------
    Begin Snap:         1 24-11? -08 14:24:00      29      15.9
      End Snap:         2 24-11? -08 14:25:14      30      15.2
       Elapsed:                1.23 (mins)Cache Sizes (end)
    ~~~~~~~~~~~~~~~~~
                   Buffer Cache:        24M      Std Block Size:         8K
               Shared Pool Size:        80M          Log Buffer:       256KLoad Profile
    ~~~~~~~~~~~~                            Per Second       Per Transaction
                                       ---------------       ---------------
                      Redo size:             24,688.49            182,694.80
                  Logical reads:                147.07              1,088.30
                  Block changes:                148.01              1,095.30
                 Physical reads:                  1.12                  8.30
                Physical writes:                  3.81                 28.20
                     User calls:                  1.95                 14.40
                         Parses:                  2.55                 18.90
                    Hard parses:                  0.47                  3.50
                          Sorts:                  1.54                 11.40
                         Logons:                  0.05                  0.40
                       Executes:                 11.99                 88.70
                   Transactions:                  0.14  % Blocks changed per Read:  100.64    Recursive Call %:    98.75
     Rollback per transaction %:    0.00       Rows per Sort:    79.21Instance Efficiency Percentages (Target 100%)
    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
               
      

  2.   

     Buffer Nowait %:  100.00       Redo NoWait %:  100.00
                Buffer  Hit   %:   99.24    In-memory Sort %:  100.00
                Library Hit   %:   94.10        Soft Parse %:   81.48
             Execute to Parse %:   78.69         Latch Hit %:  100.00
    Parse CPU to Parse Elapsd %:  100.00     % Non-Parse CPU:   99.44 Shared Pool Statistics        Begin   End
                                   ------  ------
                 Memory Usage %:   93.35   93.01
        % SQL with executions>1:   75.87   77.54
      % Memory for SQL w/exec>1:   61.08   65.50Top 5 Timed Events
    ~~~~~~~~~~~~~~~~~~                                                      % Total
    Event                                               Waits    Time (s) Call Time
    -------------------------------------------- ------------ ----------- ---------
    Queue Monitor Task Wait                                 1           5     36.58
    class slave wait                                        1           5     36.58
    CPU time                                                            2     12.72
    control file sequential read                          595           1      4.38
    db file parallel write                                 75           0      2.93
              -------------------------------------------------------------
    Wait Events  DB/Inst: SGX/sgx  Snaps: 1-2
    -> s  - second
    -> cs - centisecond -     100th of a second
    -> ms - millisecond -    1000th of a second
    -> us - microsecond - 1000000th of a second
    -> ordered by wait time desc, waits desc (idle events last)
      

  3.   

      Avg
                                                         Total Wait   wait    Waits
    Event                               Waits   Timeouts   Time (s)   (ms)     /txn
    ---------------------------- ------------ ---------- ---------- ------ --------
    Queue Monitor Task Wait                 1          0          5   5121      0.1
    class slave wait                        1          1          5   5120      0.1
    control file sequential read          595          0          1      1     59.5
    db file parallel write                 75          0          0      5      7.5
    db file sequential read                91          0          0      4      9.1
    log buffer space                        5          0          0     56      0.5
    log file parallel write                23          0          0     11      2.3
    control file parallel write            24          0          0      1      2.4
    process startup                         1          0          0      8      0.1
    log file sync                           6          0          0      1      0.6
    SQL*Net break/reset to clien            4          0          0      0      0.4
    SQL*Net message from client           128          0        361   2822     12.8
    jobq slave wait                        72         70        221   3071      7.2
    virtual circuit status                  3          3         90  30004      0.3
    queue messages                         15         15         77   5120      1.5
    wait for unread message on b           72         72         74   1025      7.2
    Queue Monitor Wait                      3          2         61  20480      0.3
    SQL*Net message to client             128          0          0      0     12.8
              -------------------------------------------------------------
    Background Wait Events  DB/Inst: SGX/sgx  Snaps: 1-2
    -> ordered by wait time desc, waits desc (idle events last)                                                                   Avg
                                                         Total Wait   wait    Waits
    Event                               Waits   Timeouts   Time (s)   (ms)     /txn
    ---------------------------- ------------ ---------- ---------- ------ --------
    Queue Monitor Task Wait                 1          0          5   5121      0.1
    class slave wait                        1          1          5   5120      0.1
    db file parallel write                 71          0          0      5      7.1
    log file parallel write                25          0          0      1      2.5
    control file parallel write            24          0          0      1      2.4
    process startup                         1          0          0      8      0.1
    rdbms ipc message                     240        207        518   2157     24.0
    Queue Monitor Wait                      3          2         61  20480      0.3
              -------------------------------------------------------------
    Wait Event Histogram  DB/Inst: SGX/sgx  Snaps: 1-2
    -> ordered by event (idle events last)
      

  4.   

    你这个报告才间隔了1.23分钟,时间太短了。看上去没问题 。
    你现在系统很慢吗?加大间隔时间,然后把完整报告的txt文件上传成附件吧。
      

  5.   

    oracle10g中statspack可以参考:http://www.oraol.cn/blog/tag/statspack