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_size

the 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解释的更多相关文章

  1. Spark算子 - groupBy

    释义 根据RDD中的某个属性进行分组,分组后形式为(k, [(k, v1), (k, v2), ...]),即groupBy 后组内元素会保留key值 方法签名如下: def groupBy[K](f ...

  2. LINQ之路 8: 解释查询(Interpreted Queries)

    LINQ提供了两个平行的架构:针对本地对象集合的本地查询(local queries),以及针对远程数据源的解释查询(Interpreted queries). 在讨论LINQ to SQL等具体技术 ...

  3. springmvc 注解 配置文件解释

    概述 继 Spring 2.0 对 Spring MVC 进行重大升级后,Spring 2.5 又为 Spring MVC 引入了注解驱动功能.现在你无须让 Controller 继承任何接口,无需在 ...

  4. count(*)、count(val)和count(1)的解释

    一.关于count的一些谣言: 1.count(*)比count(val)更慢!项目组必须用count(val),不准用count(*),谁用扣谁钱! 2.count(*)用不到索引,count(va ...

  5. php 23种设计模式的趣味解释

    http://wenku.baidu.com/link?url=GwvuvSOdJneZQc-DSKoGmPcxTtzn3cdtIp3fRaCNbkg1zJDZZZTx2NwEK5IsqU996fG3 ...

  6. 转--23种设计模式的搞笑解释(后续放逐一C++解释版本)

    创建型模式 1.FACTORY —追MM少不了请吃饭了,麦当劳的鸡翅和肯德基的鸡翅都是MM爱吃的东西,虽然口味有所不同,但不管你带MM去麦当劳或肯德基,只管向服务员说“来四个鸡翅”就行了.麦当劳和肯德 ...

  7. X窗口系统名词解释

    前端时间Gentoo的桌面环境出了点问题,发现自己对Linux的桌面环境了解的很少,于是恶补了一下知识,以下名词解释基本上都是来自维基百科的条目和<Linux程序设计(第三版)>.一般而言 ...

  8. javascript - 浏览TOM大叔博客的学习笔记

    part1 ---------------------------------------------------------------------------------------------- ...

  9. 【设计模式】用追MM来解释23种设计模式,转

    创建型模式 1.FACTORY—追MM少不了请吃饭了,麦当劳的鸡翅和肯德基的鸡翅都是MM爱吃的东西,虽然口味有所不同,但不管你带MM去麦当劳或肯德基,只管向服务员说“来四个鸡翅”就行了.麦当劳和肯德基 ...

随机推荐

  1. Mongodb安装详解及mongochef视图工具安装。

    按照国际惯例我们先来介绍一下MongoDB. MongoDB是一个基于分布式文件存储的数据库,由c++语言编写,为WEB应用提供可扩展的高性能数据存储解决方案.MongoDB属于非关系数据库,也不能说 ...

  2. 剑指Offer-编程详解-二维数组中的查找

    题目描述 在一个二维数组中(每个一维数组的长度相同),每一行都按照从左到右递增的顺序排序,每一列都按照从上到下递增的顺序排序.请完成一个函数,输入这样的一个二维数组和一个整数,判断数组中是否含有该整数 ...

  3. 六、angular 生成二维码

    首先需要安装angular-qrcode : bower install monospaced/angular-qrcode npm install angular-qrcode 如何使用? 在相应的 ...

  4. flask多线程多协程操作

    local的作用:各个线程各开辟一块空间互不影响 基于local""" import threading from threading import local impo ...

  5. Python初探-Pycharm,Anaconda-人脸识别

    版权声明:博客版权所有,转载注明出处. https://blog.csdn.net/qq_33083551/article/details/82253026 1.建议先安装Anaconda,再安装Py ...

  6. 传递给数据库 'model' 中的日志扫描操作的日志扫描号无效

    状况描述:在服务器的管理中重新启动MSSQLSERVER启动后马上又停止   通过"事件查看器" 发现 错误: ,严重度: ,状态: LSN(::)无效.该 LSN 是传递给数据库 ...

  7. Win10系统创建关机快捷方式和快捷键的方法,实现一键关机

    想不想关机变得更加简单?在Win10中总有些朋友想要快速的操作体验,所以关机这个经常使用的功能也被设置的更简单,下面小编要分享的是“Win10系统创建关机快捷方式和快捷键的方法”. 1.在win10下 ...

  8. Python学习---django多对多之Djanog默认表学习

    案例一: from django.db import models class Book(models.Model): name = models.CharField(max_length=33) # ...

  9. Exchange 2016证书配置

    配置证书: 第一步,在ECP界面生成证书请求文件: 1.在“服务器 —>证书”界面,选择一台服务器,点击“+”来添加证书申请,如下图: 2.默认下一步, 3.填写证书的友好名称,如下图: 4.默 ...

  10. ASP.NET Core 编码、web编码、网页编码 System.Text.Encodings.Web

    System.Text.Encodings.Web 空间包含表示 Web 编码器的基类.表示 HTML.JavaScript 和 Url 字符编码的子类,以及表示仅允许编码特定字符.字符范围或码位的筛 ...