重庆思庄Oracle、Redhat认证学习论坛

 找回密码
 注册

QQ登录

只需一步,快速开始

搜索
查看: 294|回复: 0
打印 上一主题 下一主题

[Oracle] How To Disable Optimizer Statistics Advisor From 12.2 Onwards

[复制链接]
跳转到指定楼层
楼主
发表于 2024-10-27 10:26:53 | 只看该作者 回帖奖励 |倒序浏览 |阅读模式
目标:
Goal of this document is to provide the method to disable the Optimizer Statistics Advisor from 12.2 onwards.

There are many issues related to Statistics advisor from 12.2.

There are lot of SYSAUX space occupied by the automatic statistics advisor task AUTO_STATS_ADVISOR_TASK. Currently, there is no method to disable the the task specifically.
There is no information available in the dictionary to know whether the AUTO_STATS_ADVISOR_TASK is enabled or disabled.

处理方法:
There is an enhancement raised to provide the feature to control the statistics advisor and is fixed in 21C. The enhancement fix added a new preference 'AUTO_STATS_ADVISOR_TASK' to control the statistic advisor run.

Unpublished Bug 26749785 - PERF_DIAG: NEED TO HAVE MORE CONTROL IN DICTIONARY FOR AUTO_STATS_ADVISOR_TASK
One-off backport can be requested for versions like 12.2 / 18c / 19c to get this functionality.

With the new fix, a new preference "AUTO_STATS_ADVISOR_TASK" is added to enable/disable AUTO_STATS_ADVISOR_TASK manually.

'TRUE'(default) :  statistics advisor will run after auto stats collection
'FALSE'            :  auto stats advisor task will be disabled.

User can set this preference to TRUE/FALSE using DBMS_STATS.set_global_prefs and check the current value set for the preference using DBMS_STATS.get_prefs API.
To check the current value for the preference:

SQL> select dbms_stats.get_prefs('AUTO_STATS_ADVISOR_TASK') from dual;

DBMS_STATS.GET_PREFS('AUTO_STATS_ADVISOR_TASK')
--------------------------------------------------------------------------------
TRUE

To disable the Statistics Advisor:

SQL> exec dbms_stats.set_global_prefs('AUTO_STATS_ADVISOR_TASK','FALSE');

PL/SQL procedure successfully completed.

SQL> select dbms_stats.get_prefs('AUTO_STATS_ADVISOR_TASK') from dual;

DBMS_STATS.GET_PREFS('AUTO_STATS_ADVISOR_TASK')
--------------------------------------------------------------------------------
FALSE

分享到:  QQ好友和群QQ好友和群 QQ空间QQ空间 腾讯微博腾讯微博 腾讯朋友腾讯朋友
收藏收藏 支持支持 反对反对
回复

使用道具 举报

您需要登录后才可以回帖 登录 | 注册

本版积分规则

QQ|手机版|小黑屋|重庆思庄Oracle、Redhat认证学习论坛 ( 渝ICP备12004239号-4 )

GMT+8, 2024-11-24 20:47 , Processed in 0.093831 second(s), 20 queries .

重庆思庄学习中心论坛-重庆思庄科技有限公司论坛

© 2001-2020

快速回复 返回顶部 返回列表