Oracle PGA sort hash _smm_max_size
来源:互联网 发布:spark的java使用 编辑:程序博客网 时间:2024/06/05 18:06
When Oracle replaced the sort_area_size and hash_area_size functionality with the pga_aggregate_target parameter in Oracle9i, there was a great deal of speculation about how to control sorting and hash joins within the large PGA region. Here we discuss two issues. How do we increase the RAM for hash joins and RAM sorting within the pga_aggregate_target?
For example, we might have a single evening batch task that would benefit from using all of the pga_aggregate_target, not just the 5% limit.
Increasing Hash Joins
To force hash joins you must perform two steps. It may not be enough to increase the hash_area_size if the CBO is stubborn, and usually you must force the hash join with a hint.
Step 1 - Increase the hash_area_size maximum
alter session set workarea_size_policy=manual;
alter session set hash_area_size=1048576000;
Step 2 - Add a use_hash hint to the SQL
select /*+ use_hash(a, b)*/
from . . .
Increasing RAM sorting
In Oracle9i, the sorting default is that no single task may consume more than 5% of thepga_aggregate_target region before the sort pages-out to the TEMP tablespace for a disk sort. For parallel sorts, the limit is 30% of the PGA aggregate, regardless of the number of parallel processes.
You can override the default sorting behavior in two ways:
Option 1 - Manual override:
alter session set workarea_size_policy=manual;
alter session set sort_area_size=1048576000;
Option 2 - Bounce with special hidden parameter: In this example, we increase the default amount of RAM available to sort operations from 5% to about 50%:
pga_aggregate_target=10g
_smm_max_size=4000000;
Not that the number for _smm_max_size is expressed in k-bytes, so this value is about 4.5 gigabytes.
Remember, hidden parameters are totally unsupported, so use this technique at your own risk.
转载自:http://www.dba-oracle.com/oracle_tips_9i_sort_size.htm
- Oracle PGA sort hash _smm_max_size
- oracle pga
- Oracle PGA
- Oracle PGA
- oracle pga
- oracle pga
- Oracle PGA
- Oracle PGA
- Oracle PGA内存管理 PGA Memory Management
- oracle pga使用控制
- Oracle PGA参数
- oracle PGA管理(算法)
- Oracle SGA PGA UGA
- Oracle PGA详解
- oracle PGA详解
- oracle 内存管理PGA
- oracle PGA管理(算法)
- Oracle PGA参考
- linux sudo使用和sudoers配置详解
- Ubuntu 12.04 终端中安装 jdk1.7 (tar.gz)
- Sprite Kit Tutorial for Beginners
- 常见纸飞机的折法
- 穿高跟鞋也可以疯狂,14.531秒跑完100米!
- Oracle PGA sort hash _smm_max_size
- 高盛帝国
- 数据结构(8)之二叉树
- On Using SQLite and FMDB Instead of Core Data
- From C Declarators to Objective-C Blocks Syntax
- windows session机制深入解析
- HTML框架的使用
- JS全选与取消全选
- 我们为什么不知道自己喜欢的职业是什么