UGA,PGA
The UGA is, in effect, your sessions state. It is memory that your session must always be able to get to. The location of the UGA is wholly dependent on how you connected to Oracle. If you connected via a shared server, then the UGA must be stored in a memory structure that every shared server process has access toand that would be the SGA. In this way, your session can use any one of the shared servers, since any one of them can read and write your sessions data. On the other hand, if you are using a dedicated server connection, this need for universal access to your session state goes away, and the UGA becomes virtually synonymous with the PGA; it will, in fact, be contained in the PGA of your dedicated server. When you look at the system statistics, youll find the UGA reported in the PGA in dedicated server mode (the PGA will be greater than or equal to the UGA memory used; the PGA memory size will include the UGA size as well).
So, the PGA contains process memory and may include the UGA. The other areas of PGA memory are generally used for in-memory sorting, bitmap merging, and hashing. It would be safe to say that, besides the UGA memory, these are the largest contributors by far to the PGA.
|
- 在dicidcate server的时候,是不在 uga里的,但是在 pga里但uga之外分配
- 在 shared server的时候,在uga里包含一部分,大小是(sort_area_retained_size),超出的部分在 pga里(sort_area_size-sort_area_retained_size),
UGA is not PGA.
see the concepts guide or if you have access to my book Expert Oracle Database Architecture, I go through many concepts like this in detail.
1gb of data would likely not be loaded into the buffer cache all at once.
sort areas would be allocated in the PGA (not UGA, UGA might be used a bit if you are using shared server, but we are getting really detailed at that point) in general.
|
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) 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.
|
UGA,PGA的更多相关文章
- ora-00600笔记
一. ORA-600 概述 Errorsof the form ORA-600 are called internal errors. This section clarifies themisund ...
- [20190402]Library Cache mutex.txt
[20190402]Library Cache mutex.txt 1.环境:SCOTT@book> @ ver1PORT_STRING VERSION ...
- [20190329]探究sql语句相关mutexes补充2.txt
[20190329]探究sql语句相关mutexes补充2.txt --//昨天测试sql语句相关mutexes,看看如果出现多个子光标的情况. 1.环境:SCOTT@book> @ ver1P ...
- [20190328]简单探究sql语句相关mutexes.txt
[20190328]简单探究sql语句相关mutexes.txt --//摘要:http://www.askmaclean.com/archives/understanding-oracle-mute ...
- 04 memory structure
本章提要--------------------------------------------------SGA: System Global Area ( 包括background process ...
- oracle-Expdp/impdp命令
建立逻辑路径 create or replace directory dumpdir as 'c:\'; grant read,write on directory dumpdir to scott; ...
- Oracle内存结构:SGA PGA UGA
内存结构是oracle数据库最重要的组成部分之一,在数据库中的操作或多或少都会依赖到内存,是影响数据库性能的重要因素Oracle数据库中包括3个基本的内存结构: 一. 系统全局区 (System G ...
- ORACLE内存结构:PGA And UGA,ORACLE用户进程、服务器进程
执行一个SQL语句 执行查询语句的过程: 用户进程执行一个查询语句如select * from emp where empno=7839 用户进程和服务器进程建立连接,把改用户进程的信息存储到PGA的 ...
- PGA和UGA内存的使用情况
引用thomas kyte的PGA和UGA的统计内存的使用情况,用排序区不同的大小来查看pga.UGA.物理读取不同内存使用 会话1:创建测试表和测试不同排序大小 create table t as ...
随机推荐
- Maven学习总结(八):Myecplise中配置maven
第一步:下载maven安装包,配置环境变量M2_HOME;变量值为maven的解压目录. 第二步:在eclipse4.0之前的版本需要安装maven插件,方法即:将maven插件包复制到eclipse ...
- js 基于可视区域 创建展示区域对应的经纬度二维数组
本篇文章主要是分享下基于地图区域创建经纬度二维数组,需要的朋友可以过来参考下 接上个文章, 基于 地图区域,算出这个展示区域对应的点. 经纬度的变化关系: XY页面展示上, 从左到右维度是增加 如: ...
- cacti 安装与 与不能显示图像故障解决方案
on debian 7&8 apt-get install snmp snmpd apt-get install cacti cacti-spine apt-get install moreu ...
- QT开发(一)Vs2013集成 QT5.3.1
原文:http://www.cnblogs.com/aoldman/p/3860837.html 很久不写随笔了,真是越来越懒.最近公司要做一款产品,想使用QT不用WPF lol,让苦逼的.net的我 ...
- 131.004 监督学习项目 | 为CharityML寻找捐献者
监督学习: 为CharityML寻找捐献者 开始 在这个项目中,你将使用1994年美国人口普查收集的数据,选用几个监督学习算法以准确地建模被调查者的收入.然后,你将根据初步结果从中选择出最佳的候选 ...
- 微信小程序开发9-宿主环境(2)
1.一个小程序页面可以分解成多个部分组成,组件就是小程序页面的基本组成单元.为了让开发者可以快速进行开发,小程序的宿主环境提供了一系列基础组件.组件是在WXML模板文件声明中使用的,WXML的语法和H ...
- 第三课 java编程入门
java特点: 1.面对象性 2.可移植性/跨平台性 java组成: jdk(java工具开发工具包) / \ \ jre 指令集合 api和常用 ...
- Android Proguard使用技巧
1.混淆后解码 ProGuard运行结束后,输出以下文件: dump.txt :描述.apk文件中所有类文件间的内部结构 mapping.txt:列出了原始的类,方法和字段名与混淆后代码间的映射.这个 ...
- [EffectiveC++]item13:Use objects to manage resources(RAII)
baidu百科 RAII 百科名片 RAII,也称为“资源获取就是初始化”,是c++等编程语言常用的管理资源.避免内存泄露的方法.它保证在任何情况下,使用对象时先构造对象,最后析构对象. 目录 RAI ...
- zeromq 笔记
一. 当执行zmq_bind后会进入mute state,直到有进入或者出去的连接发生才会进入ready state 在mute state状态下会根据不同的套接字类型决定是丢弃消息还是阻塞 可参考z ...