调整统计信息时长-凯发app官方网站

凯发app官方网站-凯发k8官网下载客户端中心 | | 凯发app官方网站-凯发k8官网下载客户端中心
  • 博客访问: 3502750
  • 博文数量: 718
  • 博客积分: 1860
  • 博客等级: 上尉
  • 技术积分: 7790
  • 用 户 组: 普通用户
  • 注册时间: 2008-04-07 08:51
个人简介

偶尔有空上来看看

文章分类

全部博文(718)

文章存档

2024年(4)

2023年(74)

2022年(134)

2021年(238)

2020年(115)

2019年(11)

2018年(9)

2017年(9)

2016年(17)

2015年(7)

2014年(4)

2013年(1)

2012年(11)

2011年(27)

2010年(35)

2009年(11)

2008年(11)

最近访客
相关博文
  • ·
  • ·
  • ·
  • ·
  • ·
  • ·
  • ·
  • ·
  • ·
  • ·

分类: oracle

2021-01-16 17:33:53

自动收集统计信息从22点开始,默认2点结束,只干活4小时,有时为了避免与夜晚跑批作业冲突,需要进行调整。

  1. --调整统计信息收集窗口为6个小时
  2. col window_name for a18
  3. col repeat_interval for a60
  4. col duration for a30
  5. set linesize 120
  6. select t1.window_name, t1.repeat_interval, t1.duration
  7.   from dba_scheduler_windows t1, dba_scheduler_wingroup_members t2
  8.  where t1.window_name = t2.window_name
  9.    and t2.window_group_name in
  10.        ('maintenance_window_group', 'bsln_maintain_stats_sched');

  11. begin
  12.   sys.dbms_scheduler.set_attribute(name => 'sys.monday_window',
  13.                                    attribute => 'repeat_interval',
  14.                                    value => 'freq=daily;byday=mon;byhour=22;byminute=0;bysecond=0');
  15.   sys.dbms_scheduler.set_attribute(name => 'sys.monday_window',
  16.                                    attribute => 'duration',
  17.                                    value => '0 06:00:00');
  18. end;
  19. /

  20. begin
  21.   sys.dbms_scheduler.set_attribute(name => 'sys.tuesday_window',
  22.                                    attribute => 'repeat_interval',
  23.                                    value => 'freq=daily;byday=tue;byhour=22;byminute=0;bysecond=0');
  24.   sys.dbms_scheduler.set_attribute(name => 'sys.tuesday_window',
  25.                                    attribute => 'duration',
  26.                                    value => '0 06:00:00');
  27. end;
  28. /

  29. begin
  30.   sys.dbms_scheduler.set_attribute(name => 'sys.wednesday_window',
  31.                                    attribute => 'repeat_interval',
  32.                                    value => 'freq=daily;byday=wed;byhour=22;byminute=0;bysecond=0');
  33.   sys.dbms_scheduler.set_attribute(name => 'sys.wednesday_window',
  34.                                    attribute => 'duration',
  35.                                    value => '0 06:00:00');
  36. end;
  37. /

  38. begin
  39.   sys.dbms_scheduler.set_attribute(name => 'sys.thursday_window',
  40.                                    attribute => 'repeat_interval',
  41.                                    value => 'freq=daily;byday=thu;byhour=22;byminute=0;bysecond=0');
  42.   sys.dbms_scheduler.set_attribute(name => 'sys.thursday_window',
  43.                                    attribute => 'duration',
  44.                                    value => '0 06:00:00');
  45. end;
  46. /

  47. begin
  48.   sys.dbms_scheduler.set_attribute(name => 'sys.friday_window',
  49.                                    attribute => 'repeat_interval',
  50.                                    value => 'freq=daily;byday=fri;byhour=22;byminute=0;bysecond=0');
  51.   sys.dbms_scheduler.set_attribute(name => 'sys.friday_window',
  52.                                    attribute => 'duration',
  53.                                    value => '0 06:00:00');
  54. end;
  55. /

  56. begin
  57.   sys.dbms_scheduler.set_attribute(name => 'sys.saturday_window',
  58.                                    attribute => 'repeat_interval',
  59.                                    value => 'freq=daily;byday=sat;byhour=6;byminute=0;bysecond=0');
  60.   sys.dbms_scheduler.set_attribute(name => 'sys.saturday_window',
  61.                                    attribute => 'duration',
  62.                                    value => '0 20:00:00');
  63. end;
  64. /

  65. begin
  66.   sys.dbms_scheduler.set_attribute(name => 'sys.sunday_window',
  67.                                    attribute => 'repeat_interval',
  68.                                    value => 'freq=daily;byday=sun;byhour=6;byminute=0;bysecond=0');
  69.   sys.dbms_scheduler.set_attribute(name => 'sys.sunday_window',
  70.                                    attribute => 'duration',
  71.                                    value => '0 20:00:00');
  72. end;
  73. /


阅读(22472) | 评论(0) | 转发(0) |
给主人留下些什么吧!~~
")); function link(t){ var href= $(t).attr('href'); href ="?url=" encodeuricomponent(location.href); $(t).attr('href',href); //setcookie("returnouturl", location.href, 60, "/"); }
网站地图