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

关于的数据流在内存中的流动的过程

[复制链接]
论坛徽章:
6
BLOG每日发帖之星
日期:2009-10-06 01:01:02ITPUB9周年纪念徽章
日期:2010-10-08 09:28:51ITPUB9周年纪念徽章
日期:2010-10-08 09:28:53数据库板块每日发贴之星
日期:2010-12-06 01:01:01
11#
发表于 2009-10-17 10:43 | 只看该作者

回复 #10 viadeazhu 的帖子

广义上你是对的。狭义上还是要参考yong的这个:

Manual workarea size policy:
              dedicated                       MTS
     --------------------------  ---------------------------------
9i   (1) SHA in PGA, UGA in PGA  (2) SHA in UGA, UGA in large pool
10g  (3) SHA in PGA              (4) SHA in UGA, UGA in large pool

Auto workarea size policy:
              dedicated                       MTS
     --------------------------  ---------------------------------
9i   (5) SHA in PGA              (6) SHA in UGA, UGA in large pool
10g  (7) SHA in PGA              (8) SHA in PGA (large pool not used)

使用道具 举报

回复
论坛徽章:
113
ITPUB9周年纪念徽章
日期:2010-10-08 09:28:512011新春纪念徽章
日期:2011-02-18 11:42:50现任管理团队成员
日期:2011-05-07 01:45:08ITPUB官方微博粉丝徽章
日期:2011-06-28 19:45:36蛋疼蛋
日期:2011-07-24 22:25:332012新春纪念徽章
日期:2012-02-13 15:12:252012新春纪念徽章
日期:2012-02-13 15:12:252012新春纪念徽章
日期:2012-02-13 15:12:252012新春纪念徽章
日期:2012-02-13 15:12:252012新春纪念徽章
日期:2012-02-13 15:12:25
12#
发表于 2009-10-17 11:04 | 只看该作者

回复 #11 opsc 的帖子

我再挑战下HuangYong的权威。
因为从狭义上我们区分UGA和PGA,那么从狭义上MTS也应该是排序发生在UGA。

使用道具 举报

回复
论坛徽章:
6
BLOG每日发帖之星
日期:2009-10-06 01:01:02ITPUB9周年纪念徽章
日期:2010-10-08 09:28:51ITPUB9周年纪念徽章
日期:2010-10-08 09:28:53数据库板块每日发贴之星
日期:2010-12-06 01:01:01
13#
发表于 2009-10-17 14:18 | 只看该作者

回复 #12 viadeazhu 的帖子

tom在8i时说过:
it will allocate up to sort_area_retained_size in the UGA and the spill over into the "pure" PGA up
to sort_area_size if the sort exceeds the sort_area_retained_size AND sort_area_size is greater
then sort_area_retained_size.

不过我测不出来:

case1:

sort_area_retained_size              integer     0          => indicates 2M same as sort_area_size
sort_area_size                       integer     2048000         

session uga memory                                                   155488
session uga memory max                                               169232
session pga memory                                                   489192
session pga memory max                                               489192

do a big sort:

session uga memory                                                  1066296
session uga memory max                                              1066296
session pga memory                                                  1461032
session pga memory max                                              1461032

do a small sort then, u'll find uga is freed, but pga not:

session uga memory                                                   200752
session uga memory max                                              1066296
session pga memory                                                  1461032
session pga memory max                                              1461032

set retraned_size showed me the same behavior:

sort_area_retained_size              integer     16384
sort_area_size                       integer     2048000

使用道具 举报

回复
论坛徽章:
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#
发表于 2009-10-19 07:56 | 只看该作者
原帖由 viadeazhu 于 2009-10-16 21:04 发表
因为从狭义上我们区分UGA和PGA,那么从狭义上MTS也应该是排序发生在UGA。


You're absolutely correct! Sorting starts in UGA, and only uses PGA if sort_area_retained_size is explicitly set to a value smaller than sort_area_size, and usage of the memory already exceeds sort_area_retained_size. As opsc quotes Tom (see http://asktom.oracle.com/pls/ask ... ON_ID:4030213308432), "sorts are done in the UGA upto sort_area_retained_size and then spill into the PGA." The same statement is found in Jonathan's CBO book, p.365. And also Steve Adams's classical writing at http://www.ixora.com.au/q+a/memory.htm (see "Hash join memory"). Ignore my last message #9. I think I need to rewrite my note LargePoolMtsPga.txt. The correction I'll make is probably change all "SHA in PGA" to "SHA in UGA". Any suggestion?

Yong Huang

[ 本帖最后由 Yong Huang 于 2009-10-19 11:16 编辑 ]

使用道具 举报

回复
论坛徽章:
25
授权会员
日期:2007-08-20 23:44:422011新春纪念徽章
日期:2011-01-25 15:42:562011新春纪念徽章
日期:2011-02-18 11:42:49管理团队成员
日期:2011-05-07 01:45:082012新春纪念徽章
日期:2012-01-04 11:49:54咸鸭蛋
日期:2012-02-06 17:15:202012新春纪念徽章
日期:2012-02-13 15:11:362012新春纪念徽章
日期:2012-02-13 15:11:362012新春纪念徽章
日期:2012-02-13 15:11:362012新春纪念徽章
日期:2012-02-13 15:11:36
15#
发表于 2009-10-20 22:25 | 只看该作者
不管是何种类型的DML语句,我认为都不会发生从buffer cache复制到pga,修改后再复制回buffer cache的事情。很简单的一个举证就是由于同时修改一个块引起的buffer busy wait这样的等待事件。

使用道具 举报

回复
论坛徽章:
13
数据库板块每日发贴之星
日期:2010-08-24 01:01:012012新春纪念徽章
日期:2012-01-04 11:57:13ITPUB十周年纪念徽章
日期:2011-11-01 16:25:51数据库板块每日发贴之星
日期:2011-07-11 01:01:01ITPUB伯乐
日期:2011-06-16 10:11:39ITPUB季度 技术新星
日期:2011-01-17 11:30:46授权会员
日期:2010-12-28 19:29:32ITPUB9周年纪念徽章
日期:2010-10-08 09:28:51数据库板块每日发贴之星
日期:2010-09-07 01:01:01数据库板块每日发贴之星
日期:2010-08-28 01:01:01
16#
发表于 2010-8-24 19:30 | 只看该作者
原帖由 magic007 于 2009-10-20 22:25 发表
不管是何种类型的DML语句,我认为都不会发生从buffer cache复制到pga,修改后再复制回buffer cache的事情。很简单的一个举证就是由于同时修改一个块引起的buffer busy wait这样的等待事件。


我觉得你这样说法不能表明问题啊。

就算发生了  复制操作  ,也是有可能引起  buffer busy wait  事件的,引起这个事件主要是这个 Buffer 被 Lock 了。

Oracle 可以在复制过程中,同时Lock Buffer啊,所以这个举证不怎么充分啊!!!

使用道具 举报

回复

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

本版积分规则 发表回复

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