oracle 全局并行,关于oracle并行操作parallel

本文介绍了如何在数据库中进行并行索引查询和取消并行的操作。通过SQL查询,展示了如何检查并行索引的状态,以及如何通过`ALTER INDEX`语句调整索引的并行性。并指出,如果不正确地管理索引的并行性,可能会导致资源浪费。建议在创建并行索引后进行取消并行操作,以优化数据库性能。
摘要由CSDN通过智能技术生成

查并行:

select *

from (select substr(owner, 1, 15) Owner,

substr(trim(degree), 1, 7) Degree,

substr(trim(instances), 1, 9) Instances,

count(*) "Num Indexes",

'Parallel'

from all_indexes

where (trim(degree) != '1' and trim(degree) != '0')

or (trim(instances) != '1' and trim(instances) != '0')

group by owner, degree, instances

union

select substr(owner, 1, 15) owner, '1', '1', count(*), 'Serial'

from all_indexes

where (trim(degree) = '1' or trim(degree) != '0')

and (trim(instances) != '1' or trim(instances) != '0')

and degree >1

group by owner)

order by owner;

或者

select owner,degree,index_name,index_type,table_name from all_indexes where degree >'1'

取消并行:

alter INDEX MPOS.IND_POP_STT noparallel;

select owner,degree,index_name,index_type,table_name from all_indexes where index_name='INDEX_NAME'

如果在创建索引的时候不使用并行之后没有对这个索引执行noparallel,在后续用到这个索引的时候会并行执行,浪费资源。所以如果创建索引使用的是并行操作的话,完事后取消并行。

来自 “ ITPUB博客 ” ,链接:http://blog.itpub.net/30536096/viewspace-1978938/,如需转载,请注明出处,否则将追究法律责任。

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值