Oracle如何禁止并行

PURPOSE

-------
 
To explain how to disable Parallel Execution on Session/System level
 
 
SCOPE & APPLICATION
-------------------
 
DBA's and Support Analysts
 
 
Disable Parallel Execution on Session Level
--------------------------------------------
 
To disable PX on session level you can use the 
following three commands together.
 
1.) ALTER SESSION DISABLE PARALLEL DML;
2.) ALTER SESSION DISABLE PARALLEL DDL;
3.) ALTER SESSION DISABLE PARALLEL QUERY;
 
A SQL statement with a parallel hint would  run in parallel if you use
"ALTER SESSION DISABLE PARALLEL DML" that is expected.
Hints overrides alter session settings.  
 
 
Disable Parallel Execution on System Level
------------------------------------------
 
To disable PX on the database level you have two possibilities.
 
1.)  Set  PARALLEL_MIN_SERVERS = 0
          PARALLEL_MAX_SERVERS = 0
          PARALLEL_AUTOMATIC_TUNING = FALSE;  
     and restart the database.
     In 10g and higher versions you can change this parameter with a ALTER SYSTEM command and 
     you do not have to restart the database.
     PARALLEL_AUTOMATIC_TUNING is deprecated in 10.1 and the default is  FALSE.   
 
2.)  Without restarting the database.
     Set the degree of all tables and indices to 1.
     You can use the command
     ALTER TABLE <TABLE_NAME> PARALLEL 1;
     ALTER INDEX <INDEX_NAME> PARALLEL 1,
 
     In the second case you can not be 100% sure that a statement runs in parallel.
     All statement which have parallel hints are still run in parallel, because
     the PARALLEL hint overrides the degree of the objects.

REFERENCES:DISABLE PARALLEL EXECUTION ON SESSION/SYSTEM LEVEL (文档 ID 235400.1)

转载于:https://www.cnblogs.com/dfzzqq/p/3238343.html

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

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

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

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值