ITPub博客

首页 > Linux操作系统 > Linux操作系统 > oracle buffer gets=db block gets+consistent gets

oracle buffer gets=db block gets+consistent gets

原创 Linux操作系统 作者:wisdomone1 时间:2013-03-15 16:41:51 0 删除 编辑

SQL> select STATISTIC#,name from v$statname where name like '%db block gets%';
 
STATISTIC# NAME
---------- ----------------------------------------------------------------
        63 db block gets
        64 db block gets from cache
        65 db block gets from cache (fastpath)
        66 db block gets direct

--9号会话为用户会话       
SQL> select sid,VALUE from v$sesstat where STATISTIC#=63 and sid=9;
 
       SID      VALUE
---------- ----------
         9        375
 
--9号会话插入数据        
SQL> insert into t_detail values(2);

1 row created.

SQL> commit;

Commit complete.  

--回到监控会话发现   
SQL> select sid,VALUE from v$sesstat where STATISTIC#=63 and sid=9;
 
       SID      VALUE
---------- ----------
         9        378

--9号会话多次运行select查询, db block gets未发生变化

小结:db block gets仅与dml有关   

--buffer gets如何计算
buffer  gets =  db block gets +  consistent  gets  

 

---db block gets与consistent gets可由如何计算而知
SQL>  select STATISTIC#,name from v$statname where name like '%db block get%';
 
STATISTIC# NAME
---------- ----------------------------------------------------------------
        63 db block gets
        64 db block gets from cache
        65 db block gets from cache (fastpath)
        66 db block gets direct
 
SQL>  select STATISTIC#,name from v$statname where name like '%consistent gets%';
 
STATISTIC# NAME
---------- ----------------------------------------------------------------
        67 consistent gets
        68 consistent gets from cache
        69 consistent gets from cache (fastpath)
        70 consistent gets - examination
        71 consistent gets direct  

来自 “ ITPUB博客 ” ,链接:https://blog.itpub.net/9240380/viewspace-756266/ ,如需转载,请注明出处,否则将追究法律责任。

请登录后发表评论 登录
全部评论
提供针对oracle初学者及进阶的数据库培训,欢迎大家咨询: 微信: wisdomone 微信公众号: lovedb 工作经历: 中国普天 北京科蓝 北京云和恩墨 北京神州新桥

注册时间:2008-04-04

  • 博文量
    2189
  • 访问量
    12687072