Oracle 11g 分区表收集统计信息 使用INCREMENTAL

Oracle 11g引入了INCREMENTAL选项,允许数据库仅扫描变化的分区来更新全局统计信息,降低资源消耗。当分区表的INCREMENTAL值设为TRUE且DBMS_STATS.GATHER_TABLE_STATS使用ESTIMATE_PERCENT参数时,此功能生效。增量维护可能导致SYSAUX表空间使用增加,但随着表和分区的增长,其性能优势将更加明显。设置INCREMENTAL选项需要使用dbms_stats.set_table_prefs等过程,并通过检查last_analyzed日期验证统计信息是否正确更新。
摘要由CSDN通过智能技术生成

在11g中,数据库可以增量维护global统计信息,通过仅扫描那些有一定比例数据发生变化的分区,其他分区仍然使用老的统计信息。


about INCREMENTAL option:

INCREMENTAL

Determines whether the global statistics of a partitioned table will be maintained without doing a full table scan.

INCREMENTAL - This value determines whether or not the global statistics of a partitioned table will be maintained without doing a full table scan. With partitioned tables it is very common to load new data into a new partition. As new partitions are added and data loaded, the global table statistics need to be kept up to date. Oracle will update the global table statistics by scanning only the partitions that have been changed instead of the entire table if the following conditions hold:

  • the INCREMENTAL value for the partitioned table is set to TRUE;

  • the PUBLISH value for the partitioned table is set to TRUE;

  • the user specifies AUTO_SAMPLE_SIZE for 

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值