12
返回列表 发新帖
楼主: lpcet4

consistent gets如何理解

[复制链接]
论坛徽章:
21
2013年新春福章
日期:2013-04-08 17:42:48马上有钱
日期:2014-02-18 16:49:31夏利
日期:2014-02-20 10:17:24马上有钱
日期:2014-08-04 15:30:58马上加薪
日期:2014-11-23 01:52:23马上加薪
日期:2015-01-08 11:42:39马上加薪
日期:2015-02-04 15:06:54喜羊羊
日期:2015-03-04 14:54:422015年新春福章
日期:2015-03-06 11:59:472014年新春福章
日期:2014-02-18 16:49:31
11#
发表于 2013-1-3 15:12 | 只看该作者
我简单的理解的,不是physical reads 就是 consistent gets。
physical reads 是啥大家都懂的。。

使用道具 举报

回复
论坛徽章:
8
2009新春纪念徽章
日期:2009-01-04 14:52:28祖国60周年纪念徽章
日期:2009-10-09 08:28:002010新春纪念徽章
日期:2010-03-01 11:07:24ITPUB9周年纪念徽章
日期:2010-10-08 09:32:25ITPUB十周年纪念徽章
日期:2011-11-01 16:23:262013年新春福章
日期:2013-02-25 14:51:24沸羊羊
日期:2015-03-04 14:51:522015年新春福章
日期:2015-03-06 11:57:31
12#
发表于 2013-1-4 12:17 | 只看该作者
吴_飚 发表于 2013-1-3 15:12
我简单的理解的,不是physical reads 就是 consistent gets。
physical reads 是啥大家都懂的。。

这个理解似乎有点问题。

使用道具 举报

回复
弱智 该用户已被删除
13#
发表于 2013-1-5 11:16 | 只看该作者
一致性读的计数。
session  发出的对某个对块的一致性读的请求?

使用道具 举报

回复
论坛徽章:
47
蒙奇·D·路飞
日期:2017-03-27 08:04:23马上有车
日期:2014-02-18 16:41:112014年新春福章
日期:2014-02-18 16:41:11一汽
日期:2013-09-01 20:46:27复活蛋
日期:2013-03-13 07:55:232013年新春福章
日期:2013-02-25 14:51:24ITPUB 11周年纪念徽章
日期:2012-10-09 18:03:322012新春纪念徽章
日期:2012-02-13 15:13:202012新春纪念徽章
日期:2012-02-13 15:13:202012新春纪念徽章
日期:2012-02-13 15:13:20
14#
发表于 2013-1-9 01:12 | 只看该作者
> 不是physical reads 就是 consistent gets。

No. The opposite of physical reads is memory reads. Their sum is equal to the sum of consistent reads and current block reads. But the two components in each of the two sums cannot be paired.

使用道具 举报

回复
论坛徽章:
7
2012新春纪念徽章
日期:2012-01-04 11:57:132013年新春福章
日期:2013-02-25 14:51:242013年新春福章
日期:2013-05-27 10:23:002013年新春福章
日期:2013-05-27 10:23:002013年新春福章
日期:2013-05-27 10:23:002014年新春福章
日期:2014-02-18 16:44:08马上有对象
日期:2014-02-18 16:44:08
15#
发表于 2013-1-10 08:53 | 只看该作者
这个SQL执行时的逻辑读。

使用道具 举报

回复
论坛徽章:
0
16#
 楼主| 发表于 2013-1-19 22:10 | 只看该作者
就我的理解是 如果一个表刚刚创建好,没有执行过任何的DML语句,如查这里我执行一个SELECT 的查询语句,我觉得consistent gets应该0才对,因为现在只是在执行一个简单的查询,并且在同一时间并没有对这个表出现过DML语句的修改修,所以不应该出现构造CR块,但是实际中,往往consistent gets并不为0。我的意思是在某一个阶段之前并没有对某一个表做过DML操作,如果执行查询一个表的话,就不会应该出现CR现像,可能我把consistent gets和CR块混了。

使用道具 举报

回复
论坛徽章:
47
蒙奇·D·路飞
日期:2017-03-27 08:04:23马上有车
日期:2014-02-18 16:41:112014年新春福章
日期:2014-02-18 16:41:11一汽
日期:2013-09-01 20:46:27复活蛋
日期:2013-03-13 07:55:232013年新春福章
日期:2013-02-25 14:51:24ITPUB 11周年纪念徽章
日期:2012-10-09 18:03:322012新春纪念徽章
日期:2012-02-13 15:13:202012新春纪念徽章
日期:2012-02-13 15:13:202012新春纪念徽章
日期:2012-02-13 15:13:20
17#
发表于 2013-1-20 05:14 | 只看该作者
> 这个SQL执行时的逻辑读。

No. Logical reads include consistent reads *and current mode reads*.

> 就我的理解是 如果一个表刚刚创建好,没有执行过任何的DML语句,如查这里我执行一个SELECT 的查询语句,我觉得consistent gets应该0才对

No. The word "consistent" does not mean the read must involve CR block read or creation. It's just the name given to the mode of read.

使用道具 举报

回复
论坛徽章:
0
18#
发表于 2014-3-25 11:08 | 只看该作者
Yong Huang 发表于 2012-12-10 22:43
Bad grammar: 指那是那些读内存操作

Consistent gets means gets (reads) in consistent mode. The read ...

you just said "he read is read of a buffer in buffer cache (memory)". when I execute ALTER SYSTEM FLUSH BUFFER_CACHE; The FLUSH BUFFER_CACHE clause lets you clear all data from the buffer cache in the system global area (SGA).Then I try to execute the SQL again,why does the 'Consistent gets' still have a non-zero value?  Thx.

使用道具 举报

回复
论坛徽章:
0
19#
发表于 2014-3-25 11:13 | 只看该作者
stevehai812 发表于 2014-3-25 11:08
you just said "he read is read of a buffer in buffer cache (memory)". when I execute ALTER SYSTEM  ...

sorry, my mistake. The data should be read to the memory whenever I FLUSHED THE BUFFER CACHE or not!

使用道具 举报

回复
论坛徽章:
47
蒙奇·D·路飞
日期:2017-03-27 08:04:23马上有车
日期:2014-02-18 16:41:112014年新春福章
日期:2014-02-18 16:41:11一汽
日期:2013-09-01 20:46:27复活蛋
日期:2013-03-13 07:55:232013年新春福章
日期:2013-02-25 14:51:24ITPUB 11周年纪念徽章
日期:2012-10-09 18:03:322012新春纪念徽章
日期:2012-02-13 15:13:202012新春纪念徽章
日期:2012-02-13 15:13:202012新春纪念徽章
日期:2012-02-13 15:13:20
20#
发表于 2014-3-25 23:01 | 只看该作者
To stevehai812,

I see why you had the question ("you just said '[t]he read is read of a buffer in buffer cache (memory)'..."). I checked my message in msg#2. That sentence should not be read alone, otherwise it would indeed be mis-interpreted. What I meant is that all regular (i.e. excluding direct path read) disk reads of a table or index are reads from disk to buffer cache. Consistent read counts the buffer blocks needed to satisfy the SQL. So in this sense you can ignore the first phase of the whole process (disk read) and just count the second phase (buffer cache read).

使用道具 举报

回复

您需要登录后才可以回帖 登录 | 注册

本版积分规则 发表回复

TOP技术积分榜 社区积分榜 徽章 团队 统计 知识索引树 积分竞拍 文本模式 帮助
  ITPUB首页 | ITPUB论坛 | 数据库技术 | 企业信息化 | 开发技术 | 微软技术 | 软件工程与项目管理 | IBM技术园地 | 行业纵向讨论 | IT招聘 | IT文档
  ChinaUnix | ChinaUnix博客 | ChinaUnix论坛
CopyRight 1999-2011 itpub.net All Right Reserved. 北京盛拓优讯信息技术有限公司版权所有 联系我们 未成年人举报专区 
京ICP备16024965号-8  北京市公安局海淀分局网监中心备案编号:11010802021510 广播电视节目制作经营许可证:编号(京)字第1149号
  
快速回复 返回顶部 返回列表