SORT_AREA_RETAINED_SIZE

本文详细解释了Oracle数据库中SORT_AREA_RETAINED_SIZE参数的作用,包括其如何控制排序操作后的内存使用,以及如何影响排序和排序连接操作。重点阐述了参数在复杂查询场景下的应用及内存管理策略。
manual pga:

SORT_AREA_RETAINED_SIZE specifies (in bytes) the maximum amount of the user global area (UGA) memory retained after a sort run completes. The retained size controls the size of the read buffer, which Oracle uses to maintain a portion of the sort in memory. This memory is released back to the UGA, not to the operating system, after the last row is fetched from the sort space.

Oracle may allocate multiple sort spaces of this size for each query. Usually, only one or two sorts occur at one time, even for complex queries. In some cases, however, additional concurrent sorts are required, and each sort keeps its own memory area. If the shared server is used, allocation is to the SGA until the value inSORT_AREA_RETAINED_SIZEis reached. The difference betweenSORT_AREA_RETAINED_SIZEandSORT_AREA_SIZEis allocated to the PGA.
A sort area retained size will not influence whether a sort is done in RAM or not -- just 
where the RESULTS of the sort will be stored.


sort_area_retained_size,在完成了所有排序所返回的结果集之后才会释放掉该内存区域.
因为这个参数并不用于sort. 因为在sort完成后,需要作sort join.而SORT_AREA_RETAINED_SIZE 用于sort  join.因此需要等返回后才能释放

转载于:https://www.cnblogs.com/zhaoshuangshuang/p/3261584.html

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值