2004年10月18日

诸位咱当电子工程师也是十余年了,不算有出息,环顾四周,也没有看见几个有出息的!回顾工程师生涯,感慨万千,愿意讲几句掏心窝子的话,也算给咱们师弟师妹们提个醒,希望他们比咱们强!

[1]好好规划自己的路,不要跟着感觉走!根据个人的理想决策安排,绝大部分人并不指望成为什么院士或教授,而是希望活得滋润一些,爽一些。那么,就需要慎重安排自己的轨迹。从哪个行业入手,逐渐对该行业深入了解,不要频繁跳槽,特别是不要为了一点工资而转移阵地,从长远看,这点钱根本不算什么,当你对一个行业有那么几年的体会,以后钱根本不是问题。频繁地动荡不是上策,最后你对哪个行业都没有摸透,永远是新手!   

[2]可以做技术,切不可沉湎于技术。千万不可一门心思钻研技术!给自己很大压力,如果你的心思全部放在这上面,那么注定你将成为孔乙己一类的人物!适可而止为之,因为技术只不过是你今后前途的支柱之一,而且还不是最大的支柱,除非你只愿意到老还是个工程师!   

[3]不要去做技术高手,只去做综合素质高手!在企业里混,我们时常瞧不起某人,说他“什么都不懂,凭啥拿那么多钱,凭啥升官!”这是普遍的典型的工程师的迂腐之言。8051很牛吗?人家能上去必然有他的本事,而且是你没有的本事。你想想,老板搞经营那么多年,难道见识不如你这个新兵?人家或许善于管理,善于领会老板意图,善于部门协调等等。因此务必培养自己多方面的能力,包括管理,亲和力,察言观色能力,攻关能力等,要成为综合素质的高手,则前途无量,否则只能躲在角落看示波器!技术以外的技能才是更重要的本事!!从古到今,美国日本,一律如此!   

[4]多交社会三教九流的朋友!不要只和工程师交往,认为有共同语言,其实更重要的是和其他类人物交往,如果你希望有朝一日当老板或高层管理,那么你整日面对的就是这些人。了解他们的经历,思维习惯,爱好,学习他们处理问题的模式,了解社会各个角落的现象和问题,这是以后发展的巨大的本钱,没有这些以后就会笨手笨脚,跌跌撞撞,遇到重重困难,交不少学费,成功的概率大大降低!

[5]知识涉猎不一定专,但一定要广!多看看其他方面的书,金融,财会,进出口,税务,法律等等,为以后做一些积累,以后的用处会更大!会少交许多学费!! 

[6]抓住时机向技术管理或市场销售方面的转变!要想有前途就不能一直搞开发,适当时候要转变为管理或销售,前途会更大,以前搞技术也没有白搞,以后还用得着。搞管理可以培养自己的领导能力,搞销售可以培养自己的市场概念和思维,同时为自己以后发展积累庞大的人脉!应该说这才是前途的真正支柱!!!   

[7]逐渐克服自己的心里弱点和性格缺陷!多疑,敏感,天真(贬义,并不可爱),犹豫不决,胆怯,多虑,脸皮太薄,心不够黑,教条式思维。。。这些工程师普遍存在的性格弱点必须改变!很难吗?只在床上想一想当然不可能,去帮朋友守一个月地摊,包准有效果,去实践,而不要只想!不克服这些缺点,一切不可能,甚至连项目经理都当不好–尽管你可能技术不错!   

[8]工作的同时要为以后做准备!建立自己的工作环境!及早为自己配置一个工作环境,装备电脑,示波器(可以买个二手的),仿真器,编程器等,业余可以接点活,一方面接触市场,培养市场感觉,同时也积累资金,更重要的是准备自己的产品,咱搞技术的没有钱,只有技术,技术的代表不是学历和证书,而是产品,拿出象样的产品,就可技术转让或与人合作搞企业!先把东西准备好,等待机会,否则,有了机会也抓不住!   

[9]要学会善于推销自己!不仅要能干,还要能说,能写,善于利用一切机会推销自己,树立自己的品牌形象,很必要!要创造条件让别人了解自己,不然老板怎么知道你能干?外面的投资人怎么相信你?提早把自己推销出去,机会自然会来找你!搞个个人主页是个好注意!!特别是培养自己在行业的名气,有了名气,高薪机会自不在话下,更重要的是有合作的机会…   

[10]该出手时便出手!永远不可能有100%把握!!!条件差不多就要大胆去干,去闯出自己的事业,不要犹豫,不要彷徨,干了不一定成功,但至少为下一次冲击积累了经验,不干永远没出息,而且要干成必然要经历失败。不经历风雨,怎么见彩虹,没有人能随随便便成功

2004年09月07日
9istatspack使用手册
http://www.chinaunix.net 作者:taocb006  发表于:2004-08-26 09:57:31
内容包括
  statspack安装
  statspack报告的详细说明

Statspack  使用说明

一.statspack系统安装 1
二.Statspack介绍 2
三.Statspack使用 4
四.Statspack报告说明 5

一.statspack系统安装
statspack的安装程序在@?/rdbms/admin/下:
spcreate.sql  安装
spdrop.sql  卸载
spauto.sql: 生成自动采集数据任务
spreport.sql  生成分析报告
spuexp.sql  参数文件
sppurge.sql 清除不在需要的数据
sptrunc.sql  清除所有的数据
sprepsql.sql:用于根据给定的SQL HASH值生成SQL报告

为了能顺利地运行Statspack 工具,则需要设置以下参数:
job_queue_processes>0  (如果不采用自动采集数据则可不设)
timed_statistics=true (如果不采用自动采集数据则可不设)

安装
1.建一个单独的表空间用于Statspack 或建在tools表空间上(>100MB)
$sqlplus “/ as sysdba”
SQL>create tablespace perfstat
SQL>datafile ‘/oracle/oradata/perfstat.dbf’
SQL>size 500M extent management local;
2.建用户perfstat及表
 SQL>@?/rdbms/admin/spcreate.sql
要求输入表空间及临时表空间.
建完后会在本目录下生成:
    spauto.lis
          spcpkg.lis
          spctab.lis
          spcusr.lis
spdtab.lis
spdusr.lis
grep –I “ora-“ *.lis 查看是否有错。

3.删除statspack表
SQL>@?/rdbms/admin/spdrop.sql
4.测试statspack
采样数据
SQL> exec statspack.snap
  后隔几分钟后再次采样数据
SQL> exec statspack.snap
           生成报表 
SQL>@?/rdbms/admin/spreport.sql

二.Statspack介绍
Oracle9i调优顺序一般采用自顶向下的顺序:

Statspack源于utlbstat和utlestat工具,在执行快照时,statspack会从 SGA内部的RAW内存结构中来采样数据,并将结果存入相应表中。
RAW v$内存结构表    à    statspack   stats$内存结构表
  V$sysstat  stats$sysstat
        V$sgastat                               stats$sgastat
        V$parameter                          stats$parameter
         V$librarycache                      stats$librarycache
1. 外部环境
内存
vmstat 
bash-2.03$ vmstat 2 5
 procs     memory            page            disk          faults      cpu
 r b w   swap  free  re  mf pi po fr de sr s0 s1 s1 –   in   sy   cs us sy id
 0 0 0 9868032 2120968 14 3 159 8  8  0  0  0  0 24  0  306  455 1204  1  2 97
 0 1 0 9813224 2154792 29 6  0 20 20  0  0  0  0 39  0  388 9587 2353  3  3 94
 0 0 0 9813224 2154296 39 0  0 40 40  0  0  0  1 46  0  393 9529 2363  5  3 92
 0 1 0 9813224 2153736 36 3  0 20 20  0  0  0  0 48  0  397 9387 2364  3  3 93
 0 0 0 9813224 2153232 37 3  0 20 20  0  0  0  0 48  0  397 9483 2360  4  3 93
其中:
CPU瓶颈:
proc下:
     r:正在运行的任务队列,当r>CPU数量时,则会出现CPU等待瓶颈 
查看CPU个数:
psrinfo –v|grep –I “status of processor” | wc -l
RAM瓶颈:
  Page下:
Pi:页导入次数:如果RAW短缺时,系统会产生pi操作
查看内存容量
   prtconf|grep –i  “mem”

2. 系统IO
   sar –d
bash-2.03$ sar -d 2 2

SunOS mydb001 5.8 Generic_108528-13 sun4us    01/09/04

08:35:11   device        %busy   avque   r+w/s  blks/s  avwait  avserv

08:35:13   nfs1              0     0.0       0       0     0.0     0.0
           sd0               0     0.0       0       0     0.0     0.0
           sd1               0     0.0       0      40     0.0     6.3
           sd1,a             0     0.0       0      40     0.0     6.3
           sd1,c             0     0.0       0       0     0.0     0.0
           sd1,d             0     0.0       0       0     0.0     0.0
           sd1,e             0     0.0       0       0     0.0     0.0
           sd1,f             0     0.0       0       0     0.0     0.0
           sd16             28     0.5      51     817     0.0    10.2
           sd16,a           28     0.5      51     817     0.0    10.2
           sd16,c            0     0.0       0       0     0.0     0.0
           ohci0,bu          0     0.0       0       0     0.0     0.0
           ohci0,ct          0     0.0       0       0     0.0     0.0
           ohci0,in          0     0.0       0       0     0.0     0.0
           ohci0,is          0     0.0       0       0     0.0     0.0
           ohci0,to          0     0.0       0       0     0.0     0.0
           
08:35:15   nfs1              0     0.0       0       0     0.0     0.0
           sd0               0     0.0       0       0     0.0     0.0
           sd1               0     0.0       1      79     0.0     4.9
           sd1,a             0     0.0       1      79     0.0     4.9
           sd1,c             0     0.0       0       0     0.0     0.0
           sd1,d             0     0.0       0       0     0.0     0.0
           sd1,e             0     0.0       0       0     0.0     0.0
           sd1,f             0     0.0       0       0     0.0     0.0
           sd16             27     0.5      47     745     0.0    10.4
           sd16,a           27     0.5      47     745     0.0    10.4
           sd16,c            0     0.0       0       0     0.0     0.0
           ohci0,bu          0     0.0       0       0     0.0     0.0
           ohci0,ct          0     0.0       0       0     0.0     0.0
           ohci0,in          0     0.0       0       0     0.0     0.0
           ohci0,is          0     0.0       0       0     0.0     0.0
           ohci0,to          0     0.0       0       0     0.0     0.0

Average    nfs1              0     0.0       0       0     0.0     0.0
           sd0               0     0.0       0       0     0.0     0.0
           sd1               0     0.0       1      59     0.0     5.4
           sd1,a             0     0.0       1      59     0.0     5.4
           sd1,c             0     0.0       0       0     0.0     0.0
           sd1,d             0     0.0       0       0     0.0     0.0
           sd1,e             0     0.0       0       0     0.0     0.0
           sd1,f             0     0.0       0       0     0.0     0.0
           sd16             27     0.5      49     781     0.0    10.3
           sd16,a           27     0.5      49     781     0.0    10.3
           sd16,c            0     0.0       0       0     0.0     0.0
           ohci0,bu          0     0.0       0       0     0.0     0.0
           ohci0,ct          0     0.0       0       0     0.0     0.0
           ohci0,in          0     0.0       0       0     0.0     0.0
           ohci0,is          0     0.0       0       0     0.0     0.0
           ohci0,to          0     0.0       0       0     0.0     0.0
说明 :
   一般%busy高些,%avque低些,文件系统的效率会较高,目前系统文件系统效率已达到

三.Statspack使用
3. 手工采样数据
sqlplus perfstat/perfstat

SQL> exec statspack.snap
  后隔几分钟后再次采样数据
SQL> exec statspack.snap
           生成报表 
SQL>@?/rdbms/admin/spreport.sql

4. 系统自动采样数据
定义定时任务
  修改spauto.sql内容,定义采样数据的时间间隔
dbms_job.submit(:jobno,’statspack.snap;’,trunc(sysdate+1/24,”HH”),’trunc(sysdate+1/24,”HH”),TRUE,:instno);
  一天24小时,1440分钟,则:
每小时一次: 1/24    (建议使用)
每30分钟一次:  1/48
每10分钟一次 1/144
每5分钟一次 1/288
后执行
   SQL>@?/rdbms/admin/spauto.sql

生成分析报告
SQL>@?/rdbms/admin/spreport.sql

停止定时任务
sqlplus perfstat/perfstat
SQL>select job,interval from user_jobs;
SQL>exec dbms_job.remove(‘:job_no’);

删除历史数据
 delete from stats$snapshot where snap_id<???
   删除全部数据
  SQL>@?/rdbms/admin/sptrunc.sql

 
四.Statspack报告说明
Statspack报告分为几个部分:
5. 数据库总体信息
6. 每秒每事务的资源消耗情况
7. 实例的各组件的命中率
8. 共享池总体情况
9. 前5个等待事件
10. DB所有等待事件
11. 后台进程等待事件
12. 根据BufferGets进行排序的SQL
13. 按物理IO进行排序的SQL
14. 按执行次数排序的SQL
15. 按分析次数排序的SQL
16. 实例的当前活动的统计数据
17. tablespace IO统计数据
18. 表空间文件 IO统计数据
19. buffer池统计数据
20. 实例恢复统计数据
21. Buffer池的参考数据
22. Buffer等待统计数据
23. PGA总体统计数据 1
24. PGA总体统计数据2
25. PGA内存参考数据
26. 回滚段统计
27. 回滚段存储统计
28. undo段总体情况
29. undo段统计
30. 锁存器的当前情况
31. 锁存器睡眠等待统计
32. 锁存器失败情况
33. 数据字典cache性能统计
34. 库cache 性能统计
35. 共享池性能统计
36. SGA区总体情况
37. SGA各组件的活动情况
38.  系统配置参数

STATSPACK report for
————————————1.DB的总体信息—————————————————-
DB Name         DB Id           Instance     Inst Num  Release  Cluster Host
———— ———–       ————         ——–     ———– ——- ————
MYDB      2125240762  mydb          1      9.2.0.1.0    NO      VCS-SERVER1

                     Snap Id     Snap Time            Sessions Curs/Sess Comment
                    ——-    ——————             ——-     ——— ——————-
Begin Snap:     1        09-Aug-04 19:28:12         32        2.7
  End Snap:      2       09-Aug-04 19:33:06         32        3.0
   Elapsed:                4.90 (mins)  (本次报告的间隔时间)

Cache Sizes (end)
~~~~~~~~~~~~~~~~~
                Buffer Cache:     1,536M        Std Block Size:         8K
           Shared Pool Size:       112M          Log Buffer:    16,000K

————————–2.每秒每事务的资源消耗情况———————
Load Profile
~~~~~~~~~~~~                      Per Second (每秒)      Per Transaction(每事务)
                                                  —————            —————
                    Redo size:                 38,498.93            6,733.30 –每秒/每事务产生的redo大小
              Logical reads:                    593.28                103.76 –每秒/每事务逻辑读
              Block changes:                    77.60                 13.57 –每秒/每事务修改的块数
             Physical reads:                        2.65                  0.46 –  每秒/每事务物理读
            Physical writes:                       8.17                  1.43 —每秒/每事务物理写
                    User calls:                     38.32                  6.70
                         Parses:                        6.52                  1.14  –SQL分析的次数
                Hard parses:                        0.05                  0.01 –SQL硬分析的次数
                          Sorts:                        0.73                  0.13–
                      Logons:                       0.01                  0.00
                    Executes:                     39.64                  6.93
              Transactions:                       5.72

  % Blocks changed per Read:   13.08    Recursive Call %:    24.84
 Rollback per transaction %:    0.00       Rows per Sort:   138.04
说明:
硬分析:就是之前不存在此SQL,是第一次解析。 如果SQL重用度很高,则硬解析应保持很低。
% Blocks changed per Read:表示逻辑读用于只读而不是修改的块的比例
Recursive Call %:递归调用SQL的比例,在PL/SQL上执行的SQL称为递归的SQL
Rollback per transaction %:    事务的回滚率
Rows per Sort:   每次排序的记录行数

———————————–3.实例的各组件的命中率———————————–
Instance Efficiency Percentages (Target 100%)
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
            Buffer Nowait %:  100.00                Redo NoWait %:  100.00
               Buffer  Hit   %:   99.55              In-memory Sort %:  100.00
              Library Hit   %:   99.33                        Soft Parse %:   99.16
        Execute to Parse %:   83.56                         Latch Hit %:   99.99
Parse CPU to Parse Elapsd %:                   % Non-Parse CPU:
说明:
   Execute to Parse %:   是语句执行与分析的比例,如果要SQL重用率高,则这个比例会很高。
  Soft Parse %:软分析:即在共享池中重复使用的SQL,系统应保持较高的软分析率,否则说明系统的SQL没有绑定变量。
Parse CPU to Parse Elapsd %:  用于分析每个CPU 花费的秒数,应该处于较高比例。如果=100%,说明CPU没有等待。
          
———————————4.共享池总体情况———————————————————
 Shared Pool Statistics                   Begin     End
                                                     ——      ——
             Memory Usage %:            89.91     90.55
    % SQL with executions>1:       32.14      32.67
  % Memory for SQL w/exec>1:   31.30     33.38
说明:
  Memory Usage %:   正在使用的共享池的%,这个值应保持在75%~90%,如果这个值太低,就浪费内存,如果太高,会使共享池外部的组件老化,如果SQL语句被再次执行,则就会发生硬分析。
% SQL with executions>1:共享池中有多少执行次数大于一次的SQL语句的度量。
% Memory for SQL w/exec>1:   频繁使用的SQL语句消耗内存多少的比例。

——————————5.前5个等待事件————————————————
Top 5 Timed Events
~~~~~~~~~~~~~~~~~~                                                      % Total
Event                                                 Waits        Time (s)    Ela Time
——————————————– ———— ———– ——–
db file sequential read                         623           3              46.70
log file sync                                       1,682           2             32.30
control file parallel write                      95             1             8.16
db file parallel write                            190             0          6.09
log file parallel write                             1,674           0         5.77
          ————————————————————-
说明:
 log file sync:当一个用户的会话提交时,会话的重写信息需要刷新到重做日志文件中,这个用户会话将发送LGWR将日志缓冲写到重做日志文件,当LGWR已经完成写入操作时,它将发送这个用户会话。
Wait Time:等待时间包括日志缓冲的写入和发送操作。

————————————–6.DB所有等待事件————————————————-
Wait Events for DB: MYDB  Instance: mydb  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)

                                                                                                            Avg
                                                                                        Total Wait   wait    Waits
Event                                                Waits     Timeouts   Time (s)   (ms)     /txn
—————————-                 ————   ———- ———- —— ——–
db file sequential read                          623          0               3            5          0.4
log file sync                                        1,682         0               2            1         1.0
control file parallel write                       95           0               1            6         0.1
db file parallel write                            190           95             0            2          0.1
log file parallel write                         1,674        1,664          0             0         1.0
db file scattered read                            25            0               0             2          0.0
control file sequential read                   78            0               0            0           0.0
LGWR wait for redo copy                    13            0               0            0          0.0
SQL*Net break/reset to clien                 4             0              0            0           0.0
buffer busy waits                                   2              0               0           0          0.0
latch free                                                1              0               0           0           0.0
SQL*Net message from client            10,830        0           4,364       403       6.4
SQL*Net more data from clien           1,596          0              0            0          0.9
SQL*Net message to client               10,830          0              0            0        6.4
          ————————————————————-

——————————–7.后台进程等待事件—————————————–
Background Wait Events for DB: MYDB  Instance: mydb  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
—————————-            ———— ———-  ———-      —— ——–
control file parallel write                95          0                1               6      0.1
db file parallel write                      190         95              0               2      0.1
log file parallel write                    1,674      1,664          0               0      1.0
control file sequential read             36          0                0               0      0.0
LGWR wait for redo copy              13          0                0               0      0.0
rdbms ipc message                        5,352      3,687      1,148         214    3.2
smon timer                                      1            1              281     ######      0.0
          ————————————————————-

——————8.根据BufferGets进行排序的SQL———————————–
SQL ordered by Gets for DB: MYDB  Instance: mydb  Snaps: 1 -2
-> End Buffer Gets Threshold:   10000
-> Note that resources reported for PL/SQL includes the resources used by
   all SQL statements called within the PL/SQL code.  As individual SQL
   statements are also reported, it is possible and valid for the summed
   total % to exceed 100

                                                                                              CPU    Elapsd
  Buffer Gets     Executions   Gets per Exec   %Total Time (s)  Time (s)  Hash Value
—————        ————        ————–        ——     ——–    ———        ———-
         74,380           20                    3,719.0             42.6     0.00       5.03         1027916473
select count(*) from myuser.userbaseinfo

         10,920        1,291                   8.5                   6.3       0.00        0.71         1385081364
insert into Refence_tabvalues(:p1, :p2, :p3, :p4, :p5,:p6)

         10,629          132                 80.5                    6.1      0.00         0.49        2785281485
update msginfo set Orig_Addr=:p1,Dest_Addr=:p2,service_type=:p3
,sub_serv_type=:p4,TransactionID=:p5,Priority=:p6,state=:p7,Send
Count=:p8,errorCode=:p9,finalDate=:p10,smFlag=:p11,tVaspId=:p12,
tVasId=:p13,tServiceCode=:p14,DateTime=:p15,DeliveryTime=:p16,Re
adReply=:p17,bAdaptations=:p18,ContentType=:p19,bMsgDistributeIn

          9,751        2,435                  4.0                     5.6     0.00          0.70        2271041384
select * from msginfo where msg_id=:p1

          9,625        2,907                  3.3                     5.5     0.00         0.93         1077832894
select * from userinfo where sub_isdn=:p1

          5,824        1,962                  3.0                     3.3     0.00         1.72        2431777133
select * from destinfo where sub_isdn=:p1

          5,787        1,156                 5.0                      3.3     0.00        0.55          3134087587
select * from msginfo_all where msg_id=:p1

          4,648           90                  51.6                     2.7     0.00        0.51         1112211039
begin smsc_util.modify_destinfo(:p1,:p2,:p3,:p4,:p5,:p6,:p7,:p8,:p9,:p10,:p11,:p12,:p13,:p14); end;

          4,031           90                  44.8                      2.3     0.00      0.23           3842824015
UPDATE destinfo SET  sub_isdn  = :b14,  NonMmsEmailAddr = :b13, sub_state= :b12,
          local_time = :b11, desiredTime =:b10,  dest_inf  = :b9,   msg_num  = :b8,             done_msg_info   = :b7,    mailN

          3,293           67                49.1                        1.9     0.00      0.16            2175688974
insert into msginfo values(:p1,:p2,:p3,:p4,:p5,:p6,:p7,:p8,:p9,
:p10,:p11,:p12,:p13,:p14,:p15,:p16,:p17,:p18,:p19,:p20,:p21,:p22
,:p23,:p24,:p25,:p26,:p27,:p28,:p29,:p30,:p31,:p32,:p33,:p34,:p3
5,:p36,:p37,:p38,:p39,:p40,:p41,:p42,:p43,:p44,:p45,:p46,:p47,:p
48,:p49,:p50,:p51,:p52,:p53,:p54,:p55,:p56,:p57,:p58,:p59,:p60,:

          2,149           28           76.8                              1.2     0.00      0.21             3752979796
delete from Refence_tabwhere SrvMsgID=:p1 and dest_addr=:p2

          1,888          118           16.0                             1.1     0.00      0.08              2500993063
select ISDN,pass from smReq where isDel = ’0′

          1,888          118           16.0                            1.1     0.00      0.11           4041890278
delete smReq where isDel = ’1′ and regType = ’0′

          1,842           56           32.9                             1.1     0.00      0.27           1728016048
begin smsc_util.OriginDone(:p1, :p2); end;

          1,679           23           73.0                             1.0     0.00      0.05            156420249
select Refrence, orig_addr, MMType from Refence_tabwhere SrvMsgID=:p1 and dest_addr=:p2

            930          198            4.7                               0.5     0.00      0.06           3744392743
UPDATE origininfo set sendnum=:b3, MsgList=:b2 where sub_isdn=:b1

            717          220            3.3                               0.4     0.00      0.13           3466225112
SELECT sendnum, MsgList from origininfo where sub_isdn=:b1

            640           40           16.0                               0.4     0.00      0.03           776298407
select count(*) from smReq

            527           42           12.5                               0.3     0.00      0.12            3721822251
INSERT INTO destinfo     VALUES(:b1, :b2, :b3, :b4, :b5, :b6, :b7, :b8, :b9,:b10, :b11, :b12,  :b13, :b14)

            187           48            3.9                                0.1     0.00      0.23         4009906312
select bMonthBillState, bMsgStatus from monthbillinfo where wYear=:p1 and bMonth=:p2 and tBillAddr=:p3 and tVaspId=:p4 and tVasId=:p5 and tServiceCode=:p6 and tDestAddr=:p7

            171           12           14.3                              0.1     0.00      0.08           664582079
begin smsc_util.Auto_OpenSubServ(:p1,:p2,:p3,:p4,:p5,:p6,:p7,:p8,:p9,:p10,:p11,:p12,:p13,:p14,:p15,:p16,:p17,:p18,:p19,:p20,:p21,:p22); end;

            140           20            7.0                               0.1     0.00      0.01           2872798779
select count(*) from myuser.sys_var

            139           22            6.3                              0.1     0.00      0.01             714875384
INSERT into origininfo values(:b1, :b3, :b2)

            114           57            2.0                              0.1     0.00      0.02              2963598673
select job, nvl2(last_date, 1, 0) from sys.job$ where (((:1 <= next_date) and (next_date < :2))    or  ((last_date is null) and (next_date < :3))) and (field1 = :4 or (field1 = 0 and ’Y' = :5) ) and (this_date is null) order by next_date, job

            110           12            9.2                              0.1     0.00      0.02            1315078830
INSERT INTO userinfo VALUES(:b22  ,:b21  ,:b20 ,:b19 ,:b18

          ————————————————————-
说明:
就是通过执行了多少个逻辑IO来排序

————————–9.按物理IO进行排序的SQL————————————————
SQL ordered by Reads for DB: MYDB  Instance: mydb  Snaps: 1 -2
-> End Disk Reads Threshold:    1000

                                                                                                      CPU      Elapsd
 Physical Reads    Executions  Reads per Exec   %Total   Time (s)  Time (s)  Hash Value
—————          ————     ————–               ——    ——–       ———   ———-
            246                1,962            0.1                          31.5     0.00          1.72      2431777133
select * from destinfo where sub_isdn=:p1

            149                   20            7.5                            19.1     0.00         5.03       1027916473
select count(*) from myuser.userbaseinfo

            110              2,907            0.0                           14.1     0.00         0.93       1077832894
select * from userinfo where sub_isdn=:p1

            100             1,156            0.1                           12.8     0.00          0.55       3134087587
select * from msginfo_all where msg_id=:p1

             89                1                89.0                          11.4     0.00         2.46        2700929825
Module: SQL*Plus   BEGIN statspack.snap(); END;

             31             2,435            0.0                             4.0     0.00          0.70        2271041384
select * from msginfo where msg_id=:p1

             31             48                0.6                              4.0     0.00          0.23       4009906312
select bMonthBillState, bMsgStatus from monthbillinfo where wYear=:p1 and bMonth=:p2 and tBillAddr=:p3 and tVaspId=:p4 and tVasId=:p5 and tServiceCode=:p6 and tDestAddr=:p7

         ————————————————————-
说明:
  如果发现系统的IO有限制,则可检查上述的SQL语句。

——————————–10.按执行次数排序的SQL—————————————–
SQL ordered by Executions for DB: MYDB  Instance: mydb  Snaps: 1 -2
-> End Executions Threshold:     100

                                                                               CPU per    Elap per
 Executions   Rows Processed   Rows per Exec    Exec (s)    Exec (s)    Hash Value
————        —————     —————-        ———–  ———-       ———-
       2,907             904                   0.3                    0.00        0.00           1077832894
select * from userinfo where sub_isdn=:p1

       2,435           2,435                1.0                      0.00        0.00           2271041384
select * from msginfo where msg_id=:p1

       1,962           1,893               1.0                       0.00        0.00           2431777133
select * from destinfo where sub_isdn=:p1

       1,291           1,291              1.0                       0.00        0.00           1385081364
insert into Refence_tabvalues(:p1, :p2, :p3, :p4, :p5,:p6)

       1,156           1,156              1.0                      0.00        0.00           3134087587
select * from msginfo_all where msg_id=:p1

         220             198               0.9                       0.00          0.00          3466225112
SELECT sendnum, MsgList from origininfo where sub_isdn=:b1

         198             198              1.0                      0.00          0.00           3744392743
UPDATE origininfo set sendnum=:b3, MsgList=:b2 where sub_isdn=:b1

         132           3,171            24.0                      0.00        0.00             2785281485
update msginfo set Orig_Addr=:p1,Dest_Addr=:p2,service_type=:p3
,sub_serv_type=:p4,TransactionID=:p5,Priority=:p6,state=:p7,Send
Count=:p8,errorCode=:p9,finalDate=:p10,smFlag=:p11,tVaspId=:p12,
tVasId=:p13,tServiceCode=:p14,DateTime=:p15,DeliveryTime=:p16,Re
adReply=:p17,bAdaptations=:p18,ContentType=:p19,bMsgDistributeIn

         118               0              0.0       0.00        0.00 2500993063
select ISDN,pass from smReq where isDel = ’0′

         118               0              0.0       0.00        0.00 4041890278
delete smReq where isDel = ’1′ and regType = ’0′

          90              90              1.0       0.00        0.01 1112211039
begin smsc_util.modify_destinfo(:p1,:p2,:p3,:p4,:p5,:p6,:p7,:p8,:p9,:p10,:p11,:p12,:p13,:p14); end;

          90               0                 0.0                 0.00        0.00                     1912568914
COMMIT WORK

          90           1,152             12.8               0.00         0.00                      3842824015
UPDATE destinfo SET  sub_isdn = :b14,  NonMmsEmailAddr = :b13, sub_state  = :b12,
 local_time  = :b11,  desiredTime =:b10, dest_info = :b9, msg_num = :b8,             done_msg_info   = :b7,    mailN

          68               0              0.0       0.00        0.00 3615375148
COMMIT

          67           1,206             18.0       0.00        0.00 2175688974
insert into msginfo values(:p1,:p2,:p3,:p4,:p5,:p6,:p7,:p8,:p9,
:p10,:p11,:p12,:p13,:p14,:p15,:p16,:p17,:p18,:p19,:p20,:p21,:p22
,:p23,:p24,:p25,:p26,:p27,:p28,:p29,:p30,:p31,:p32,:p33,:p34,:p3
5,:p36,:p37,:p38,:p39,:p40,:p41,:p42,:p43,:p44,:p45,:p46,:p47,:p
48,:p49,:p50,:p51,:p52,:p53,:p54,:p55,:p56,:p57,:p58,:p59,:p60,:

          59               0              0.0       0.00        0.00 4064019595
select ISDN from syncsubReq where regType=’D’

          57               0              0.0       0.00        0.00 2963598673
select job, nvl2(last_date, 1, 0) from sys.job$ where (((:1 <= n
ext_date) and (next_date < :2))    or  ((last_date is null) and
(next_date < :3))) and (field1 = :4 or (field1 = 0 and ’Y' = :5)
) and (this_date is null) order by next_date, job

          57              57              1.0       0.00        0.00 2964743345
select count(*) from sys.job$ where (next_date > sysdate) and (n
ext_date < (sysdate+5/86400))

          56              56              1.0       0.00        0.00 1728016048
begin smsc_util.OriginDone(:p1, :p2); end;

          48              43              0.9       0.00        0.00 4009906312
select bMonthBillState, bMsgStatus from monthbillinfo where wYea
r=:p1 and bMonth=:p2 and tBillAddr=:p3 and tVaspId=:p4 and tVasI
d=:p5 and tServiceCode=:p6 and tDestAddr=:p7

          42              81              1.9       0.00        0.00 3721822251
INSERT INTO destinfo      VALUES(:b1, :b2, :b3,:b4, :b5, :b6, :b7, :b8, :b9,
     :b10, :b11, :b12,                    :b13, :b14)

          40              40              1.0       0.00        0.00  776298407
select count(*) from smReq

          28              26              0.9       0.00        0.01 3752979796
delete from Refence_tabwhere SrvMsgID=:p1 and dest_addr=:p2

          23              10              0.4       0.00        0.00  156420249
select Refrence, orig_addr, MMType from Refence_tabwhere SrvMsgID=:p1 and dest_addr=:p2

          22              22              1.0       0.00        0.00  714875384
INSERT into origininfo values(:b1, :b3, :b2)

          20              20              1.0       0.00        0.25 1027916473
select count(*) from myuser.userbaseinfo

          20              20              1.0       0.00        0.00 2872798779
select count(*) from myuser.sys_var

          12              12              1.0       0.00        0.01  664582079
begin smsc_util.Auto_OpenSubServ(:p1,:p2,:p3,:p4,:p5,:p6,:p7,:p8
,:p9,:p10,:p11,:p12,:p13,:p14,:p15,:p16,:p17,:p18,:p19,:p20,:p21
,:p22); end;

          12              12              1.0       0.00        0.00 1315078830
INSERT INTO userinfo VALUES(:b22  ,:b21  ,:b20 ,:b19 ,:b18
,   :b17 ,:b16 ,:b15 ,:b14 ,:b13 ,   :b12 ,:b11 ,:b10 ,:b9 ,:b8
,   :b7 ,:b6 ,:b5 ,:b4 ,:b3 ,   :b2 ,:b1 ,to_date(‘19940101′,’yy
yymmdd’),to_date(‘19940101′,’yyyymmdd’))

          12              12              1.0       0.00        0.00 3365174823
INSERT INTO userbaseinfo (sub_isdn) VALUES (:b1)

          ————————————————————-
说明:
对于频繁执行的SQL语句,应注意跟踪。

—————————-11.按分析次数排序的SQL—————————————–
SQL ordered by Parse Calls for DB: MYDB  Instance: mydb  Snaps: 1 -2
-> End Parse Calls Threshold:      1000

                                              % Total
 Parse Calls       Executions   Parses               Hash Value
————          ————     ——–              ———-
       1,291          1,291           67.38                 1385081364
insert into Refence_tabvalues(:p1, :p2, :p3, :p4, :p5,:p6)

         118          118              6.16                   2500993063
select ISDN,pass from smReq where isDel = ’0′

         118          118             6.16                     4041890278
delete smReq where isDel = ’1′ and regType = ’0′

          59           59           3.08                            4064019595
select ISDN from syncsubReq where regType=’D’

          48           48            2.51                             4009906312
select bMonthBillState, bMsgStatus from monthbillinfo where wYear=:p1 and bMonth=:p2 and tBillAddr=:p3 and tVaspId=:p4 and tVasId=:p5 and tServiceCode=:p6 and DestAddr=:p7

          40           40             2.09                           776298407
select count(*) from smReq

          28           28             1.46                           3752979796
delete from Refence_tabwhere SrvMsgID=:p1 and dest_addr=:p2

          23           23             1.20                            156420249
select Refrence, orig_addr, MMType from Refence_tabwhere SrvMsgID=:p1 and dest_addr=:p2

          20           20     1.04 1027916473
select count(*) from myuser.userbaseinfo

          20           20     1.04 2872798779
select count(*) from myuser.sys_var

          12           12     0.63  664582079
begin smsc_util.Auto_OpenSubServ(:p1,:p2,:p3,:p4,:p5,:p6,:p7,:p8,:p9,:p10,:p11,:p12,:p13,:p14,:p15,:p16,:p17,:p18,:p19,:p20,:p21,:p22); end;

           5            5     0.26  122554595
insert into monthbillinfo values(:p1, :p2, :p3, :p4, :p5, :p6, :p7, :p8, :p9)

           2            2     0.10 3949568363
update userinfo set sub_property=:p1, sub_auth=:p2, profile_id=:p3, UaCapacity=:p4, cug_flag=:p5, cug_id=:p6, NonMmsEmailAddr=:p7, bForwardAddrFg=:p8, tForwardAddr=:p9, bBlackUserNum=:p10, tBlackUserList=:p11, MMAutoSave=:p12, MsgLenthLimit=:p13, MsgfilterTag=:p14, bMoCopyAddrFg=:p15, tMoCopyAddr=:p16, bWhiteUserN

         ————————————————————-

————————–12.实例的当前活动的统计数据———————————————
Instance Activity Stats for DB: MYDB  Instance: mydb  Snaps: 1 -2

Statistic                                                       Total     per Second    per Trans
———————————                —————— ————– ————
CR blocks created                                          8            0.0                 0.0
DBWR buffers scanned                                 0            0.0                 0.0
DBWR checkpoint buffers written                2,402      8.2                 1.4
DBWR checkpoints                                       0             0.0                 0.0
DBWR free buffers found                              0            0.0          0.0
DBWR lru scans                                            0            0.0          0.0
DBWR make free requests                             0            0.0          0.0
DBWR revisited being-written buff               0            0.0          0.0
DBWR summed scan depth                            0            0.0          0.0
DBWR transaction table writes                       7            0.0          0.0
DBWR undo block writes                              347            1.2          0.2
SQL*Net roundtrips to/from client             10,823           36.8          6.4
active txn count during cleanout                  229            0.8          0.1
background checkpoints completed               0            0.0          0.0
background checkpoints started                     0            0.0          0.0
background timeouts                                   347            1.2          0.2
branch node splits                                         0            0.0          0.0
buffer is not pinned count                           106,967          363.8         63.6
buffer is pinned count                               16,784           57.1         10.0
bytes received via SQL*Net from c          4,449,217       15,133.4      2,646.8
bytes sent via SQL*Net to client              7,342,023       24,972.9      4,367.7
calls to get snapshot scn: kcmgss              22,055           75.0         13.1
calls to kcmgas                                           1,742            5.9          1.0
calls to kcmgcs                                            216            0.7          0.1
change write time                                        22            0.1          0.0
cleanout - number of ktugct calls                256            0.9          0.2
cleanouts and rollbacks - consist                  3            0.0          0.0
cleanouts only - consistent read                   6            0.0          0.0
cluster key scan block gets                           0            0.0          0.0
cluster key scans                                           0            0.0          0.0
commit cleanout failures: buffer                   0            0.0          0.0
commit cleanout failures: callbac                  6            0.0          0.0
commit cleanout failures: cannot                   1            0.0          0.0
commit cleanouts                                           7,237           24.6          4.3
commit cleanouts successfully com              7,230           24.6          4.3
commit txn count during cleanout                  52            0.2          0.0
consistent changes                                            14            0.1          0.0
consistent gets                                             151,986          517.0         90.4
consistent gets - examination                         34,097          116.0         20.3
current blocks converted for CR                    0            0.0          0.0
cursor authentications                                       3            0.0          0.0
data blocks consistent reads - un                      14            0.1          0.0
db block changes                                           22,813           77.6         13.6
db block gets                                                 22,437           76.3         13.4
deferred (CURRENT) block cleanout              4,759           16.2          2.8
dirty buffers inspected                                       0            0.0          0.0
enqueue conversions                                          25            0.1          0.0
enqueue releases                                               6,184           21.0          3.7
enqueue requests                                              6,184           21.0          3.7
enqueue timeouts                                                0            0.0          0.0
enqueue waits                                                     0            0.0          0.0
exchange deadlocks                                           0            0.0          0.0
execute count                                                    11,653           39.6          6.9
free buffer inspected                                         0            0.0          0.0
free buffer requested                                     1,583            5.4          0.9
hot buffers moved to head of LRU                  14            0.1          0.0
immediate (CR) block cleanout app                  9            0.0          0.0
immediate (CURRENT) block cleanou                137            0.5          0.1
index fast full scans (full)                       0            0.0          0.0
index fetch by key                             9,759           33.2          5.8
index scans kdiixs1                           19,989           68.0         11.9
leaf node 90-10 splits                            13            0.0          0.0
leaf node splits                                  46            0.2          0.0
logons cumulative                                  2            0.0          0.0
messages received                              1,769            6.0          1.1
messages sent                                  1,769            6.0          1.1
no buffer to keep pinned count                     0            0.0          0.0
no work - consistent read gets               107,624          366.1         64.0
opened cursors cumulative                        507            1.7          0.3
parse count (failures)                             0            0.0          0.0
parse count (hard)                                16            0.1          0.0
parse count (total)                            1,916            6.5          1.1
physical reads                                   780            2.7          0.5
physical reads direct                              0            0.0          0.0
physical writes                                2,402            8.2          1.4
physical writes direct                             0            0.0          0.0
physical writes non checkpoint                   760            2.6          0.5
pinned buffers inspected                           0            0.0          0.0
prefetch clients - default                         0            0.0          0.0
prefetched blocks                                132            0.5          0.1
prefetched blocks aged out before                 35            0.1          0.0
recursive calls                                3,723           12.7          2.2
redo blocks written                           23,853           81.1         14.2
redo buffer allocation retries                     0            0.0          0.0
redo entries                                  11,949           40.6          7.1
redo log space requests                            0            0.0          0.0
redo log space wait time                           0            0.0          0.0
redo ordering marks                                0            0.0          0.0
redo size                                 11,318,684       38,498.9      6,733.3
redo synch time                                  155            0.5          0.1
redo synch writes                              1,681            5.7          1.0
redo wastage                                 615,032        2,092.0        365.9
redo write time                                  129            0.4          0.1
redo writer latching time                          0            0.0          0.0
redo writes                                    1,673            5.7          1.0
rollback changes - undo records a                  0            0.0          0.0
rollbacks only - consistent read                   6            0.0          0.0
rows fetched via callback                      4,551           15.5          2.7
session logical reads                        174,423          593.3        103.8
session pga memory max                             0            0.0          0.0
session uga memory                            26,080           88.7         15.5
session uga memory max                       222,256          756.0        132.2
shared hash latch upgrades - no w             19,425           66.1         11.6
shared hash latch upgrades - wait                  0            0.0          0.0
sorts (disk)                                           0            0.0          0.0
sorts (memory)                                   214            0.7          0.1
sorts (rows)                                        29,541          100.5         17.6
summed dirty queue length                          0            0.0          0.0
switch current to new buffer                       1            0.0          0.0
table fetch by rowid                           7,403           25.2          4.4
table fetch continued row                         78            0.3          0.1
table scan blocks gotten                      89,731          305.2         53.4
table scan rows gotten                    14,759,044       50,200.8      8,779.9
table scans (direct read)                          0            0.0          0.0
table scans (long tables)                          0            0.0          0.0
table scans (rowid ranges)                         0            0.0          0.0
table scans (short tables)                       442            1.5          0.3
transaction rollbacks                              0            0.0          0.0
transaction tables consistent rea                  0            0.0          0.0
transaction tables consistent rea                  0            0.0          0.0
user calls                                              11,266           38.3          6.7
user commits                                       1,681            5.7          1.0
user rollbacks                                       0            0.0          0.0
workarea executions - onepass                      0            0.0          0.0
workarea executions - optimal                    119            0.4          0.1
write clones created in foregroun                  0            0.0          0.0
          ————————————————————-
说明:
可通过是面详细数据计算各种命中率等。
如:soft parse= (1-hard parse/total parse)*100%= (1-16/1916)*100%=99.16%就是报表开头的soft parse值。

———————————13.tablespace IO统计数据——————————————
Tablespace IO Stats for DB: MYDB  Instance: mydb  Snaps: 1 -2
->ordered by IOs (Reads + Writes) desc

Tablespace
——————————
                            Av          Av        Av                    Av                          Buffer         Av Buf
         Reads   Reads/s    Rd(ms)    Blks/Rd         Writes     Writes/s      Waits          Wt(ms)
————– ——-      ——     ——-            ————   ——–      ———-          ——
USERS
           444         2             5.0            1.3                  874           3                   0             0.0
SHTMSG
           131         0            1.9              1.0                 1,005        3                  1              0.0
UNDOTBS
             0          0             0.0              353                 1               1                 0             0.0
IDEX
           73         0            3.7                 1.0                147             1                  0             0.0 
SYSTEM
             0       0               0.0                11                   0               0                                0.0
          ————————————————————-

———————————14.表空间文件 IO统计数据——————————————
File IO Stats for DB: MYDB  Instance: mydb  Snaps: 1 -2
->ordered by Tablespace, File

Tablespace               Filename
———————— —————————————————-
                            Av        Av           Av                    Av                       Buffer     Av Buf
         Reads   Reads/s    Rd(ms)    Blks/Rd            Writes Writes/s      Waits    Wt(ms)
————– ——-    ——        ——- -            ———–  ——–       ——— ——
IDEX                     /dev/lvidex
            73           0          3.7             1.0                   147          1              0

SHTMSG                   /dev/lvshtmsg
           131       0            1.9             1.0                 1,005           3             1         0.0

SYSTEM                   /dev/lvsystem
             0       0                          11        0          0

UNDOTBS                  /dev/lvundotbs
             0       0                         353        1          1    0.0

USERS                    /dev/lvusers
           444       2    5.0     1.3          874        3          0

          ————————————————————-

———————————15.buffer池统计数据——————————————
Buffer Pool Statistics for DB: MYDB  Instance: mydb  Snaps: 1 -2
-> Standard block size Pools  D: default,  K: keep,  R: recycle
-> Default Pools for other block sizes: 2k, 4k, 8k, 16k, 32k

                                                                                                  Free    Write       Buffer
      Number of    Cache        Buffer    Physical   Physical  Buffer  Complete    Busy
P      Buffers         Hit %        Gets       Reads     Writes      Waits    Waits        Waits
— ———- —– ———– ———– ———- ——- ——–  ——
D      190,560         99.7       258,404         780       2,390         0               0             2
          ————————————————————-

———————————-16.实例恢复统计数据——————————————
Instance Recovery Stats for DB: MYDB  Instance: mydb  Snaps: 1 -2
-> B: Begin snapshot,  E: End snapshot

  Targt         Estd                                                            Log File      Log Ckpt   Log Ckpt
  MTTR  MTTR   Recovery    Actual       Target           Size           Timeout      Interval
   (s)          (s)           Estd IOs  Redo Blks  Redo Blks   Redo Blks   Redo Blks  Redo Blks
- —– —– ———- ———- ———- ———- ———- ———-
B   161    28         11145         100666     100000          450000        207466     100000
E   161    28         11608         100043     100000          450000         199928     100000
          ————————————————————-

———————————-17.Buffer池的参考数据—————————————–
Buffer Pool Advisory for DB: MYDB  Instance: mydb  End Snap: 2
-> Only rows with estimated physical reads >0 are displayed
-> ordered by Block Size, Buffers For Estimate

        Size for          Size          Buffers for    Est Physical          Estimated
P     Estimate (M)   Factr         Estimate      Read Factor      Physical Reads
— ———— —– —————- ————- ——————
D            160            .1           19,850             1.92                  81,500,147
D            320    .2           39,700          1.69         71,754,201
D            480    .3           59,550          1.57         66,774,777
D            640    .4           79,400          1.49         63,154,327
D            800    .5           99,250          1.40         59,432,741
D            960    .6          119,100          1.22         52,009,931
D          1,120    .7          138,950          1.08         46,041,143
D          1,280    .8          158,800          1.04         44,306,471
D          1,440    .9          178,650          1.01         42,974,849
D          1,536   1.0          190,560          1.00         42,478,849
D          1,600   1.0          198,500          0.99         42,032,350
D          1,760   1.1          218,350          0.97         41,128,356
D          1,920   1.3          238,200          0.94         39,877,785
D          2,080   1.4          258,050          0.92         39,058,138
D          2,240   1.5          277,900          0.91         38,475,363
D          2,400   1.6          297,750          0.88         37,173,210
D          2,560   1.7          317,600          0.85         35,983,344
D          2,720   1.8          337,450          0.83         35,325,000
D          2,880   1.9          357,300          0.81         34,595,023
D          3,040   2.0          377,150          0.79         33,731,234
D          3,200   2.1          397,000          0.77         32,711,726
          ————————————————————-

———————————-18.Buffer等待统计数据——————————————
Buffer wait Statistics for DB: MYDB  Instance: mydb  Snaps: 1 -2
-> ordered by wait time desc, waits desc

                                 Tot Wait    Avg
Class                    Waits   Time (s) Time (ms)
—————— ———– ———- ———
data block                   1          0         0
undo block                   1          0         0
          ————————————————————-

———————————-19.PGA总体统计数据 1——————————————
PGA Aggr Target Stats for DB: MYDB  Instance: mydb  Snaps: 1 -2
-> B: Begin snap   E: End snap (rows dentified with B or E contain data
   which is absolute i.e. not diffed over the interval)
-> PGA cache hit % - percentage of W/A (WorkArea) data processed only in-memory
-> Auto PGA Target - actual workarea memory target
-> W/A PGA Used    - amount of memory used for all Workareas (manual + auto)
-> %PGA W/A Mem    - percentage of PGA memory allocated to workareas
-> %Auto W/A Mem   - percentage of workarea memory controlled by Auto Mem Mgmt
-> %Man W/A Mem    - percentage of workarea memory under manual control

PGA Cache Hit %    W/A MB Processed         Extra W/A MB Read/Written
—————                 —————- -                ————————
          100.0                          7                                                0

                                                                                    %PGA    %Auto   %Man
  PGA Aggr    Auto PGA   PGA Mem    W/A PGA    W/A       W/A      W/A     Global Mem
  Target(M)   Target(M)     Alloc(M)       Used(M)      Mem      Mem      Mem    Bound(K)
- ——— ——— ———- ———- —— —— —— ———-
B       200        174               27.1                    0.0          .0             .0            .0        10,240
E       200        174              27.1                     0.0         .0              .0            .0        10,240
          ————————————————————-

———————————-20.PGA统计数据 2——————————————
PGA Aggr Target Histogram(柱状图) for DB: MYDB  Instance: mydb  Snaps: 1 -2
-> Optimal Executions are purely in-memory operations

    Low     High
Optimal  Optimal    Total Execs  Optimal Execs   1-Pass Execs    M-Pass Execs
——-     ——-     ————–     ————-          ———–              ————
     8K      16K             98               98                                   0            0
    16K     32K             12               12                                  0            0
    32K     64K              2                 2                                   0            0
    64K    128K             3                 3                                   0            0
    2M      4M               2                 2                                   0            0
          ————————————————————-

———————————-21.PGA内存参考数据 ——————————————
PGA Memory Advisory for DB: MYDB  Instance: mydb  End Snap: 2
-> When using Auto Memory Mgmt, minimally choose a pga_aggregate_target value
   where Estd PGA Overalloc Count is 0

                                                              Estd Extra    Estd PGA   Estd PGA
PGA Target     Size          W/A MB      W/A MB Read/      Cache      Overalloc
  Est (MB)      Factr         Processed    Written to Disk         Hit %       Count
———-    ——-     —————-    —————-    ——–     ———-
        25       0.1           6,180.6          3,466.6                 64.0          0
        50       0.3          6,180.6          3,459.1                 64.0          0
       100     0.5          6,180.6            861.1                   88.0          0
       150     0.8          6,180.6            861.1     88.0          0
       200     1.0          6,180.6            861.1     88.0          0
       240     1.2          6,180.6            861.1     88.0          0
       280     1.4          6,180.6            861.1     88.0          0
       320     1.6          6,180.6            861.1     88.0          0
       360     1.8          6,180.6            861.1     88.0          0
       400     2.0          6,180.6            861.1     88.0          0
       600     3.0          6,180.6            861.1     88.0          0
       800     4.0          6,180.6            861.1     88.0          0
     1,200     6.0          6,180.6            861.1     88.0          0
     1,600     8.0          6,180.6            629.9     91.0          0
          ————————————————————-

———————————-22.回滚段统计——————————————
Rollback Segment Stats for DB: MYDB  Instance: mydb  Snaps: 1 -2
->A high value for ”Pct Waits” suggests more rollback segments may be required
->RBS stats may not be accurate between begin and end snaps when using Auto Undo
  managment, as RBS may be dynamically created and dropped as needed

                Trans Table       Pct       Undo Bytes
RBS No      Gets             Waits        Written        Wraps   Shrinks    Extends
——     ————–       ——-     —————     ——-    ——–      ——–
     0            2.0          0.00               0                 0             0            0
     1            345.0         0.00         388,926        1        0        0
     2           458.0          0.00         519,636         1        0        0
     3           397.0        0.00         348,516         1        0        0
     4          330.0       0.00         319,184         0        0        0
     5          467.0        0.00         561,346         0        0        0
     6          403.0        0.00         387,552         0        0        0
     7          431.0       0.00         711,298         0        0        0
     8          444.0       0.00         348,148         1        0        0
     9          393.0        0.00         376,176         1        0        0
    10          334.0       0.00         320,640         0        0        0
          ————————————————————-

———————————-23.回滚段存储统计——————————————
Rollback Segment Storage for DB: MYDB  Instance: mydb  Snaps: 1 -2
->Optimal Size should be larger than Avg Active

RBS No    Segment Size      Avg Active    Optimal Size    Maximum Size
——    ————— —————   —————   —————
     0           385,024               0                          385,024
     1       24,240,128         953,522                       38,920,192
     2       29,483,008       1,012,839                       50,520,064
     3       29,483,008         999,571                       50,454,528
     4       27,385,856         943,570                       38,920,192
     5       28,434,432         965,310                      117,563,392
     6       30,531,584       1,036,116                      84,008,960
     7       27,385,856         918,922                      151,183,360
     8       28,434,432       1,009,932                       50,520,064
     9       29,483,008       1,036,116                       50,454,528
    10       25,288,704         953,522                       37,871,616
          ————————————————————-

———————————-24.undo段总体情况—————————————-
Undo Segment Summary for DB: MYDB  Instance: mydb  Snaps: 1 -2
-> Undo segment block stats:
-> uS - unexpired Stolen,   uR - unexpired Released,   uU - unexpired reUsed
-> eS - expired   Stolen,   eR - expired   Released,   eU - expired   reUsed

Undo     Undo      Num   Max Qry     Max Tx  Snapshot   Out of uS/uR/uU/
 TS#      Blocks      Trans   Len (s)    Concurcy   Too Old     Space eS/eR/eU
—- -   ————- ———- ——–      ———-     ——– —— ————-
   1          2,970   ##########      357          2             0            0 0/0/0/0/0/0
          ————————————————————-

———————————-25.undo段统计——————————————
Undo Segment Stats for DB: MYDB  Instance: mydb  Snaps: 1 -2
-> ordered by Time desc

                       Undo      Num   Max Qry    Max Tx    Snap        Out of uS/uR/uU/
End Time           Blocks    Trans  Len (s)     Concy      Too Old    Space eS/eR/eU
———— ———— ——– ——- ——– ——- —— ————-
09-Aug 19:42     1,306     ########      16         2              0      0 0/0/0/0/0/0
09-Aug 19:32     1,664     ########     357        2              0      0 0/0/0/0/0/0
          ————————————————————-

———————————-26.锁存器的当前情况——————————————
Latch Activity for DB: MYDB  Instance: mydb  Snaps: 1 -2
->”Get Requests”, ”Pct Get Miss” and ”Avg Slps/Miss” are statistics for
  willing-to-wait latch get requests
->”NoWait Requests”, ”Pct NoWait Miss” are for no-wait latch get requests
->”Pct Misses” for both should be very close to 0.0

                                                                    Pct      Avg     Wait                              Pct
                                                Get             Get      Slps     Time       NoWait     NoWait
Latch                                    Requests      Miss    /Miss    (s)         Requests        Miss
———————— ————– —— —— —— ———— ——
Consistent RBA                    1,673             0.0                     0            0
SQL memory manager latch      1             0.0                     0           96              0.0
SQL memory manager worka    6,565      0.0                     0            0
active checkpoint queue             192         0.0                     0            0
cache buffer handles                452           0.0                     0            0
cache buffers chains            366,694         0.0    0.0           0        1,707    0.0
cache buffers lru chain           3,980          0.0                    0          552    0.0
channel handle pool latc           4              0.0                    0            0
channel operations paren        199            0.0             0            0
checkpoint queue latch           13,445         0.1           0.0      0        2,741    0.0
child cursor hash table             201        0.0             0            0
dml lock allocation                 8,361       0.0             0            0
dummy allocation                      4    0.0             0            0
enqueue hash chains              12,371    0.0    0.0      0            0
enqueues                               2,662    0.0             0            0
event group latch                     2    0.0             0            0
file number translation              14    0.0             0            0
hash table column usage               7    0.0             0            0
job_queue_processes para              5    0.0             0            0
ktm global data                       1    0.0             0            0
lgwr LWN SCN                      1,674    0.0             0            0
library cache                    80,405    0.0    0.1      0            0
library cache load lock              46    0.0             0            0
library cache pin                28,408    0.0             0            0
library cache pin alloca          7,888    0.0             0            0
list of block allocation              8    0.0             0            0
messages                         12,581    0.0    0.0      0            0
mostly latch-free SCN             1,733    2.4    0.0      0            0
multiblock read objects              54    0.0             0            0
ncodef allocation latch               5    0.0             0            0
post/wait queue                   3,346    0.0             0        1,681    0.0
process allocation                    2    0.0             0            2    0.0
process group creation                4    0.0             0            0
redo allocation                  15,281