针对以上3个概念进行的说明解释及关系如下: 1、DB Block Gets(当前请求的块数目)当前模式块意思就是在操作中正好提取的块数目,而不是在一致性读的情况下而产生的块数。正常的情况下,一个查询提取的块是在查询开始的那个时间点上存在的数据块,当前块是在这个时刻存在的数据块,而不是在这个时间点之前或者之后的数据块数目。

2、Consistent Gets(数据请求总数在回滚段Buffer中的数据一致性读所需要的数据块)这里的概念是在处理你这个操作的时候需要在一致性读状态上处理多少个块,这些块产生的主要原因是因为由于在你查询的过程中,由于其他会话对数据块进行操 作,而对所要查询的块有了修改,但是由于我们的查询是在这些修改之前调用的,所以需要对回滚段中的数据块的前映像进行查询,以保证数据的一致性。这样就产 生了一致性读。

3、Physical Reads(物理读)就是从磁盘上读取数据块的数量,其产生的主要原因是: 1、 在数据库高速缓存中不存在这些块 2、 全表扫描 3、 磁盘排序

它们三者之间的关系大致可概括为:逻辑读指的是Oracle从内存读到的数据块数量。一般来说是'consistent gets' + 'db block gets'。当在内存中找不到所需的数据块的话就需要从磁盘中获取,于是就产生了'phsical reads'。

· Recursive Calls. Number of recursive calls generated at both the user and system level. Oracle Database maintains tables used for internal processing. When it needs to change these tables, Oracle Database generates an internal SQL statement, which in turn generates a recursive call. In short, recursive calls are basically SQL performed on behalf of your SQL. So, if you had to parse the query, for example, you might have had to run some other queries to get data dictionary information. These would be recursive calls. Space management, security checks, calling PL/SQL from SQL—all incur recursive SQL calls.

· DB Block Gets. Number of times a CURRENT block was requested.
Current mode blocks are retrieved as they exist right now, not in a consistent read fashion. Normally, blocks retrieved for a query are retrieved as they existed when the query began. Current mode blocks are retrieved as they exist right now, not from a previous point in time. During a SELECT, you might see current mode retrievals due to reading the data dictionary to find the extent information for a table to do a full scan (because you need the "right now" information, not the consistent read). During a modification, you will access the blocks in current mode in order to write to them. (DB Block Gets:请求的数据块在buffer能满足的个数)

· Consistent Gets. Number of times a consistent read was requested for a block. This is how many blocks you processed in "consistent read" mode. This will include counts of blocks read from the rollback segment in order to roll back a block. This is the mode you read blocks in with a SELECT, for example. Also, when you do a searched UPDATE/DELETE, you read the blocks in consistent read mode and then get the block in current mode to actually do the modification. (Consistent Gets:数据请求总数在回滚段Buffer中)

· Physical Reads. Total number of data blocks read from disk. This number equals the value of "physical reads direct" plus all reads into buffer cache. (Physical Reads:实例启动后,从磁盘读到Buffer Cache数据块数量)

· Sorts (disk). Number of sort operations that required at least one disk write. Sorts that require I/O to disk are quite resource intensive. Try increasing the size of the initialization parameter SORT_AREA_SIZE.

db block gets 当前的block是什么数据,那么读到的就是什么数据比如数据是session自己产生的在dml的时候读block中 数据 也必须是当前block的

而在查询中,block中数据如果是别人更改过的,需要去回滚段中读取变化前的数据,这时产生consistent reads 。这个叫 一致读,也就是块处于 query mode 下

但是 consistent gets 是在query mode下的读,即使没有产生 consistent reads ,但是也叫 consistenet gets

consistent gets=一致性读的block的个数,简单理解就是select访问的block个数 db block gets=简单理解,就是update、insert、delete访问的block个数

buffer gets = db block gets + consistent gets tuning 单个sql 不应该 物理读为标准,而应该以逻辑读(buffer gets)为标准在数据库整体上来讲,是要降低 物理读而对于单条 sql 来讲,是以逻辑读的降低为标准的道理很简单,对于单条sql来说,如果反复运行,物理读决定于 data buffer 的大小 ,第一次运行 和 第二次运行也是不一样的。但比较稳定的是 逻辑读。 如果以物理读为标准,那难道物理读为0的sql就是好sql 了?如果sql的逻辑读都良好,那数据库整体的物理读降下来也是很自然的事情

db block gets 和 physical reads 完全是两个不同的概念!通常情况下 db block gets 可以理解为是 dml 产生的

consistent gets query mode 下 read 次数 比如根据索引查询可能对同一个 block读多次那就是 多个 constent gets

ff consistent gets 是指为保持一致性, 而从undo segment处取得数据. ff 这是读一致性下获取的数据块,从undo 读数据叫 consistent reads , consistent gers 包含了 consistent reads
db block get+consistent gets = logical read

  1. 我们通过向tbl3表中插入数据,可以看到统计分析中产生了consistent gets和db block gets,consistent gets由select产生,db block gets由insert产生

  2. 下面我们删除掉tbl3数据

  3. 我们再来执行一个insert,通过下图可以看到,因为我们的查询没有检索到数据,所以产生了大量consistent gets,而db block gets几乎可以忽略不计。

db block gets、consistent gets和physical reads相关推荐

  1. oracle gc buffur,【性能調優】Oracle AWR報告指標全解析

    1-1  內存參數大小 Cache Sizes                       BeginEnd ~~~~~~~~~~~                  ---------- ----- ...

  2. Oracle AWR报告指标全解析-11011552

    1-5 Top 5 Timed Events Waits : 该等待事件发生的次数, 对于DB CPU此项不可用 Times : 该等待事件消耗的总计时间,单位为秒, 对于DB CPU 而言是前台进程 ...

  3. Oracle AWR报告指标全解析

    1-5 Top 5 Timed Events Waits : 该等待事件发生的次数, 对于DB CPU此项不可用 Times : 该等待事件消耗的总计时间,单位为秒, 对于DB CPU 而言是前台进程 ...

  4. oracle awr详解

    啥是AWR? ============================================================================================= ...

  5. 【性能调优】Oracle AWR报告指标全解析

    [性能调优]Oracle AWR报告指标全解析 啥是AWR? ===================================================================== ...

  6. INDEX FULL SCAN vs INDEX FAST FULL SCAN

    INDEX FULL SCAN 与 INDEX FAST FULL SCAN两个长相差不多,乃是一母同胞,因此既有其共性,也有其个性.两者来说其共性是不用扫描表而是通过索引就可以直接返回所需要的所有数 ...

  7. oracle sql以及性能调优

    目 录 1.选用适合的ORACLE优化器 2 2.访问Table的方式 3 3.共享SQL语句 3 4.选择最有效率的表名顺序(只在基于规则的优化器中有效) 5 5.WHERE子句中的连接顺序. 6 ...

  8. 我的小金库(跬步千里)

    ------------------------------------------PGA----------------------------------------- 预估pga_target的 ...

  9. SQL优化篇--SQL TUNNING ADVICER使用

    –STA调优(SQL文本) DECLARE my_task_name VARCHAR2(30); my_sqltext CLOB; BEGIN my_sqltext := 'select * from ...

最新文章

  1. python下什么版本-python版本有什么不同
  2. VC++ error C2248: “CObject::CObject”: 无法访问 private 成员(在“CObject”类中声明)
  3. 《几何与代数导引》例2.6
  4. 初等数学O 集合论基础 第四节 二元关系、等价类与运算
  5. bind9 配置说明
  6. netty worker线程数量_Dubbo线程模型
  7. gulp之gulp.watch报错
  8. 潭州课堂25班:Ph201805201 django框架 第五课 自定义简单标签,包含标签,模型类创建,梳理类创建 (课堂笔记)...
  9. javascript !-- //-- 与老的浏览器打交道
  10. 能把汉字转化为拼音的一个函数
  11. java 获取对象的大小限制_Java - 如何获取对象大小
  12. 鸿蒙 OS 2.0 来了!值得开发者关注的是什么?
  13. 将Maven创建的web Servlet2.3工程改为Servlet3.0
  14. 一套不错的php,一套不错的PHP笔试题-附答案.pdf
  15. XP上安装瑞友天翼4.0
  16. ps使用仿制图章工具,图案图章工具
  17. 8.7.1. Declaration of Enumerated Types
  18. 恭贺除夕,没什么才艺展示,就给大家画新年四格小漫画吧 >⌒<
  19. 太励志!考研哈工大高数39分,但逆袭成为院士,做出诺奖级发现
  20. ACM入门及STL简介(转)

热门文章

  1. 英雄联盟登录服务器显示错误码,lol登录失败_TGP一直验证账号,最后出现登录超时,错误码:1,L......
  2. 设计一个分数类java_设计一个学生类,学生类中应包括学号,姓名,语文成绩,数学成绩,英语成绩,同时还要提供两个方法,一个方...
  3. 人工智能全面战胜人类?下一步是取代人类?
  4. win 10 取消用户帐户控制
  5. “离婚”华为后,荣耀第一胎满身伤痕
  6. 为什么要阅读计算机经典著作
  7. 虾皮怎么注册开店,开一个属于你的优质店铺
  8. 文科生能学好数据分析吗
  9. iOS Swift No.21 - 协议2
  10. Python脚本破解Linux口令(crypt模块)