EBS 对特定表单独收集统计信息 - fnd_stats.gather_table_stats

对于某些EBS某些特定的表要做分析, 需撇开相同schema下的超大表,那么必须使用 fnd_stats.gather_table_stats对表进行统计信息收集, 而不能针对 schema ,    这样就需要对每个需要的表进行单独处理 。

如果是RAC,  想跨节点并行执行, 可加入 execute immediate 'alter session set parallel_force_local=false'; 


CREATE OR REPLACE PROCEDURE  apps.gather_pmpc_stats   as  
BEGIN   
  begin  fnd_stats.GATHER_TABLE_STATS('HWCUST','HW_PM_BUSINESS_KEY_T');    exception  when others then null;  end;   
  begin  fnd_stats.GATHER_TABLE_STATS('HWCUST','HW_PM_CALENDERS_T');    exception  when others then null;  end;   
  begin  fnd_stats.GATHER_TABLE_STATS('HWCUST','HW_PM_DELIVERY_UNIT_TI');    exception  when others then null;  end;   
  begin  fnd_stats.GATHER_TABLE_STATS('HWCUST','HW_PM_DELIVERY_UNIT_TMP');    exception  when others then null;  end;   
  begin  fnd_stats.GATHER_TABLE_STATS('HWCUST','HW_PM_DU_ACTIVITIES_TI');    exception  when others then null;  end;  
.....

end  gather_pmpc_stats  ;
/



begin 
   dbms_scheduler.create_job
        (
        job_name=> 'GATHER_PMPC_STATS_JOB', 
        job_type=> 'STORED_PROCEDURE',         
        job_action=> 'APPS.GATHER_PMPC_STATS',
        repeat_interval => 'FREQ=WEEKLY; BYDAY=SUN;BYHOUR=0', 
        enabled=> true, 
        comments => 'Gather statistics for specified tables in PM and PC'
        )   ; 
end ;
 

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

转载于:http://blog.itpub.net/35489/viewspace-774146/

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

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

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

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值