-
alter session set nls_date_format='yyyy-mm-dd hh24:mi:ss';
-
-
select client_name,task_name,operation_name,status from dba_autotask_task; -- status 应该是 enabled
-
-
select client_name,status from dba_autotask_client order by 1;
-
-
select program_name,program_type,program_action from dba_scheduler_programs where program_name = 'gather_stats_prog'; --action应该是dbms_stats.gather_database_stats_job_proc
-
-
select window_name,autotask_status from dba_autotask_window_clients ; --status应该是 enabled
-
-
select a.window_name,a.repeat_interval,a.duration from dba_scheduler_windows a where enabled = 'true'; --duration 应该是4小时 周末20小时
-
-
select * from ( select a.job_name,a.actual_start_date,a.run_duration,a.status
-
from dba_scheduler_job_run_details a where a.job_name like 'ora$at_os_opt%' order by actual_start_date desc) where rownum<11 ; --近期 status应该是succeeded
-
-
select * from (select owner,t.table_name,t.num_rows,t.blocks,t.last_analyzed from dba_tables t where owner not in ('sys','system','dbsnmp','mdsys','ctxsys','xdb','dvsys') and last_analyzed is not null order by last_analyzed desc ) where rownum<11; --验证
sho parameter job
设置 statistics_level = basic 禁用自动优化器统计信息收集。
还不够?
dba_autotask_client
dba_autotask_client_history
dba_autotask_client_job
dba_autotask_job_history
dba_autotask_operation
dba_autotask_schedule
dba_autotask_task
dba_autotask_window_clients
dba_autotask_window_history
手工执行收集统计信息
exec dbms_auto_task_immediate.gather_optimizer_stats;
select dbms_stats.get_prefs('stale_percent') from dual;
可以看以下属性
autostats_target
cascade
degree
estimate_percent
method_opt
no_invalidate
granularity
publish
incremental
stale_percent
改一个
exec dbms_stats.set_global_prefs('stale_percent','5');
参考:
常见问题解答:自动统计信息收集(文档 id 1233203.1)
阅读(1126) | 评论(0) | 转发(0) |