sort_area_retained_size之tom解释
sort_area_retained_size 摘录一段asktom中tom的解释,对sort内存分配的方式进行了描述:
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.the sort_area_retained_size parameter is often misunderstood. At a high level, this is what happens:to do a sort, Oracle allocates chunks of memory up to a maximum of sort_area_size.As each chunk is allocated -- Oracle checks to see if the sort area is less then the sort_area_retained_size.If so, this chunk is allocated in memory that survives from call to call (in the UGA -- where ever the UGA might be -- in the pga or sga). This memory survives as long as needed (across many calls potentially to fetch rows and such)If not, this chunk is allocated in the "pure pga" and freed at the end of the call. This memory does not survive across calls at all.Sort area memory is not necessarily contigous memory -- hence bits of it could be in the SGA, some in the PGA -- it matters not to Oracle.see also
1) What happens when the sort is completed,I mean where is the resultset(fetched rows) kept before sending it to the user process.According to me ,it is in UGA.
1) the sort workarea is kept in whole or part (the rest goes to TEMP on disk). The rows come from this 'retained' size.
In manual memory management, you used to set
a) sort_area_size
b) sort_area_RETAINED_sizethe amount of memory upto (a) would be allocated during the sort and upon completion - right before returning the data, the workarea would be shrunk down to (b) with any excess being written to disk. So, you could set (a) to 10mb and (b) to 1mb - we'd use 10mb to sort the data, shrink the workarea does to 1mb and use that as a buffer to return the data to the client through.
In automatic memory management, the server sets (a) and (b) as it likes.
sort_area_retained_size之tom解释的更多相关文章
- Spark算子 - groupBy
释义 根据RDD中的某个属性进行分组,分组后形式为(k, [(k, v1), (k, v2), ...]),即groupBy 后组内元素会保留key值 方法签名如下: def groupBy[K](f ...
- LINQ之路 8: 解释查询(Interpreted Queries)
LINQ提供了两个平行的架构:针对本地对象集合的本地查询(local queries),以及针对远程数据源的解释查询(Interpreted queries). 在讨论LINQ to SQL等具体技术 ...
- springmvc 注解 配置文件解释
概述 继 Spring 2.0 对 Spring MVC 进行重大升级后,Spring 2.5 又为 Spring MVC 引入了注解驱动功能.现在你无须让 Controller 继承任何接口,无需在 ...
- count(*)、count(val)和count(1)的解释
一.关于count的一些谣言: 1.count(*)比count(val)更慢!项目组必须用count(val),不准用count(*),谁用扣谁钱! 2.count(*)用不到索引,count(va ...
- php 23种设计模式的趣味解释
http://wenku.baidu.com/link?url=GwvuvSOdJneZQc-DSKoGmPcxTtzn3cdtIp3fRaCNbkg1zJDZZZTx2NwEK5IsqU996fG3 ...
- 转--23种设计模式的搞笑解释(后续放逐一C++解释版本)
创建型模式 1.FACTORY —追MM少不了请吃饭了,麦当劳的鸡翅和肯德基的鸡翅都是MM爱吃的东西,虽然口味有所不同,但不管你带MM去麦当劳或肯德基,只管向服务员说“来四个鸡翅”就行了.麦当劳和肯德 ...
- X窗口系统名词解释
前端时间Gentoo的桌面环境出了点问题,发现自己对Linux的桌面环境了解的很少,于是恶补了一下知识,以下名词解释基本上都是来自维基百科的条目和<Linux程序设计(第三版)>.一般而言 ...
- javascript - 浏览TOM大叔博客的学习笔记
part1 ---------------------------------------------------------------------------------------------- ...
- 【设计模式】用追MM来解释23种设计模式,转
创建型模式 1.FACTORY—追MM少不了请吃饭了,麦当劳的鸡翅和肯德基的鸡翅都是MM爱吃的东西,虽然口味有所不同,但不管你带MM去麦当劳或肯德基,只管向服务员说“来四个鸡翅”就行了.麦当劳和肯德基 ...
随机推荐
- C#读取Json文件
C#读取Json文件并赋值给初始值 一.有Json文件如下(若用记事本编辑记得另存为-编码选择 U-TF8): 二.读取方法: using Newtonsoft.Json;using Newtonso ...
- canvas toDataURL() 方法如何生成部分画布内容的图片
HTMLCanvasElement.toDataURL() 方法返回一个包含图片展示的 data URI .可以使用 type参数其类型,默认为 PNG 格式.图片的分辨率为96dpi. 如果画布的高 ...
- 01_Netty简述
[Netty的NIO模型与常见的NIO模型对比] [原始的BIO模型] ServerSocket serverSocket = Socket clientSocket = serverSocket.a ...
- awk 正则表达式、正则运算符详细介绍
前言:使用awk作为文本处理工具,正则表达式是少不了的. 要掌握这个工具的正则表达式使用.其实,我们不必单独去学习它的正则表达式.正则表达式就像一门程序语言,有自己语法规则已经表示意思. 对于不同工具 ...
- P2DR模型
P2DR模型是可适应网络安全理论或称为动态信息安全理论的主要模型.P2DR模型是TCSEC模型的发展,也是目前被普遍采用的安全模型.P2DR模型包含四个主要部分:Policy(安全策略).Protec ...
- FOR YOU
给你 作者:余秀华 一家朴素的茶馆, 面前目光朴素的你皆为我喜欢 你的胡子,昨夜辗转的面色让我忧伤 我想带给你的,一路已经丢失得差不多 除了窗外凋谢的春色 遇见你以后,你不停地爱别人,一个接一个 我没 ...
- xgcom linux下的串口助手
好用到爆@@! 2.Install: Source code: http://code.google.com/p/xgcom/ svn checkout http://xgcom.googlecode ...
- Linux的CPU相关知识
超线程和多线程的区别? 超线程从硬件层面理解,即一个CPU的部件(可以理解为核)同时执行多条指令,表现就是同时执行多个线程.多线程是软件层面的概念,比如CPU只有一个核,通过线程调度可以在一个时间段内 ...
- 移动端不同分辨率适配--使用flexible
根据阿里手淘团队发布的可伸缩布局方案amfe-flexible,git地址:https://github.com/amfe/lib-flexible. 使用方法: lib-flexible库的使用方法 ...
- iOS js 使用与JSContext
JSContext:js执行环境,包含了js执行时所需要的所有函数和对象: js执行时,会在执行环境搜索需要的函数然后执行,或者保存传入的变量或函数: JSContext *jsContext = [ ...