oracle海量数据加快创建索引速度

基本信息情况:

数据库版本:Oracle Database 11g Enterprise Edition Release 11.2.0.1.0 - 64bit Production

操作系统版本:CentOS release 5.6

加快创建索引速度主要从一下角度考虑:

  • 使用nologging 参数
  • 使用parallel 并行参数
  • 在session级别使用manual pga,手动调整sort_area_size
  • 修改其他参数

注意:我们这里不手动调整hash_area_size,hash_area_size 默认情况下会自动根据sort_area_size*2来调,导致sort_area_size不能超过1G。所以我们这里直接调整sort_area_size参数。


这里首先记录pga使用的情况,9i以后查询pga分配和使用可以查询v$pgastat视图。

SQL> desc v$pgastat;
名称 
--------------------------------
NAME 名称 
VALUE 值 
UNIT 单位 
-------------------统计项 
select * from v$pgastat
NAME                                          VALUE UNIT
---------------------------------------- ---------- ----------
aggregate PGA target parameter            150994944 bytes 
aggregate PGA auto target                  93579264 bytes
global memory bound                        30198784 bytes
total PGA inuse                            47017984 bytes
total PGA allocated                        56666112 bytes
maximum PGA allocated                      58632192 bytes
total freeable PGA memory                   2883584 bytes
process count                                    23
max processes count                              48
PGA memory freed back to OS                 5177344 bytes
total PGA used for auto workareas                 0 bytes
maximum PGA used for auto workareas               0 bytes
total PGA used for manual workareas               0 bytes
maximum PGA used for manual workareas             0 bytes
over allocation count                             0
bytes processed                             6438912 bytes
extra bytes read/written                          0 bytes
cache hit percentage                            100 percent
recompute count (total)                         123


  • 2
    点赞
  • 6
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值