自动统计信息收集的优势 - 收集统计信息优先级:最需要统计信息的被优先收集...

在Oracle 11gR2中,自动优化器统计信息收集通过调用DBMS_STATS.GATHER_DATABASE_STATS_JOB_PROC过程实现。该过程会为那些尚无统计信息或已有的统计信息过时(由于对象变动超过10%)的数据库对象收集统计信息。与DBMS_STATS.GATHER_DATABASE_STATS相比,此过程更注重优先处理最需要更新统计信息的对象。

11gR2

       Automatic optimizer statistics collection gathers optimizer statistics by calling the DBMS_STATS.GATHER_DATABASE_STATS_JOB_PROC procedure. The GATHER_DATABASE_STATS_JOB_PROC procedure collects statistics on database objects when the object has no previously gathered statistics or the existing statistics are stale because the underlying object has been modified significantly (more than 10% of the rows).
        The DBMS_STATS.GATHER_DATABASE_STATS_JOB_PROC is an internal procedure, but it operates in a very similar fashion to the DBMS_STATS.GATHER_DATABASE_STATS procedure using the GATHER AUTO option.

        The primary difference is that the DBMS_STATS.GATHER_DATABASE_STATS_JOB_PROC procedure prioritizes the database objects that require statistics, so that those objects which most need updated statistics are processed first. This ensures that the most-needed statistics are gathered before the maintenance window closes. 

         自动统计信息收集会调用  DBMS_STATS.GATHER_DATABASE_STATS_JOB_PROC 这个proceudre 来进行统计信息收集,之前没有统计信息
或者统计信息过时(stale ,  更改超过 10% rows)的objects 都会收集 。  
         DBMS_STATS.GATHER_DATABASE_STATS_JOB_PROC 是 sys 下的内部procedure,  它类似 DBMS_STATS.GATHER_DATABASE_STATS 存储
过程(使用 GATHER AUTO 选项) 。 
         他们的区别  (DBMS_STATS.GATHER_DATABASE_STATS_JOB_PROC   和 DBMS_STATS.GATHER_DATABASE_STATS )是: 前者会将需要
统计信息的 object 进行优先级排序, 以便哪些非常需要更新统计信息的 object 被首先执行, 这个可以确保最需要统计信息的object 可以在维护
时间窗关闭之前被收集统计信息 。 

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

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

评论
成就一亿技术人!
拼手气红包6.0元
还能输入1000个字符  | 博主筛选后可见
 
红包 添加红包
表情包 插入表情
 条评论被折叠 查看
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值