11g RAC数据库多节点并行操作开关 - PARALLEL_FORCE_LOCAL


PARALLEL_FORCE_LOCAL
 
PARALLEL_FORCE_LOCAL如果指定为TRUE, 并行操作只会在当前instance里面并行,而不会垮多节点,在11g R2 默认为FALSE,   如果想跨多个节点运行并行操作, 可以设置为 false  。 


例子:

每周日 22:00  运行全量CBO

begin
  execute immediate 'alter session set parallel_force_local=false';
  dbms_stats.gather_database_stats(estimate_percent => 100,
                                   method_opt       => 'for all indexed columns',
                                   options          => 'GATHER',degree => 128);
end;




其它每天 22:00,运行增量
begin
  execute immediate 'alter session set parallel_force_local=false';
  dbms_stats.gather_database_stats(estimate_percent => dbms_stats.auto_sample_size,
                                   method_opt       => 'for all indexed columns',
                                   options          => 'GATHER AUTO',degree => 32);
end;
 
请使用浏览器的分享功能分享到微信等