Chinaunix首页 | 论坛 | 博客
  • 博客访问: 1168404
  • 博文数量: 178
  • 博客积分: 2776
  • 博客等级: 少校
  • 技术积分: 2809
  • 用 户 组: 普通用户
  • 注册时间: 2012-03-22 15:36
文章分类

全部博文(178)

文章存档

2014年(3)

2013年(66)

2012年(109)

分类: Oracle

2013-05-21 14:28:31

System altered

SQL>  select event,total_waits,time_waited,average_wait from v$session_event  where sid=1 order by total_waits desc;

 

EVENT                                                            TOTAL_WAITS TIME_WAITED AVERAGE_WAIT

---------------------------------------------------------------- ----------- ----------- ------------

db file sequential read                                                  139          99         0.71  --此等待事件增大,是因为会读取与本话相关的一些字典表的数据

SQL*Net message to client                                                 24           0            0

SQL*Net message from client                                               23      260608     11330.78

log file sync                                                              5           0         0.09

Disk file operations I/O                                                   4           0         0.06

events in waitclass Other                                                  3           6         1.93

SQL*Net break/reset to client                                              2           0         0.01

enq: RO - fast object reuse                                                1           1         0.81

 

8 rows selected

---读取表记录

SQL> select * from t_single;

         A

----------

         1

         2

 

---对比发现db file sequential read等待事件加大了

SQL> /

 

EVENT                                                            TOTAL_WAITS TIME_WAITED AVERAGE_WAIT

---------------------------------------------------------------- ----------- ----------- ------------

db file sequential read                                                  142         104         0.73

SQL*Net message to client                                                 26           0            0

SQL*Net message from client                                               25      263763     10550.52

log file sync                                                              5           0         0.09

Disk file operations I/O                                                   4           0         0.06

events in waitclass Other                                                  3           6         1.93

SQL*Net break/reset to client                                              2           0         0.01

enq: RO - fast object reuse                                                1           1         0.81

 

8 rows selected

---表已在buffer cache

SQL> /

         A

----------

         1

         2

---对比发现如表已在buffer cachedb file sequential read不会增加

SQL> /

 

EVENT                                                            TOTAL_WAITS TIME_WAITED AVERAGE_WAIT

---------------------------------------------------------------- ----------- ----------- ------------

db file sequential read                                                  142         104         0.73

SQL*Net message to client                                                 28           0            0

SQL*Net message from client                                               27      280384     10384.58

log file sync                                                              5           0         0.09

Disk file operations I/O                                                   4           0         0.06

events in waitclass Other                                                  3           6         1.93

SQL*Net break/reset to client                                              2           0         0.01

enq: RO - fast object reuse                                                1           1         0.81

 

8 rows selected unix培训


阅读(2921) | 评论(0) | 转发(0) |
给主人留下些什么吧!~~