Randolf Geist on 11g Incremental Statistics

原文地址:

http://www.oaktable.net/content/randolf-geist-11g-incremental-statistics

 

以下内容摘自OakTable.net,有关增量统计信息的深入理解:

Randolf Geist on 11g Incremental Statistics

 

1.   The first time you implement Incrementals on a table, Oracle will have to trawl through the entire table in order to build the initial synposes. This has always seemed obvious to me - how can you incrementally build on synposes that haven't been created yet? But the long duration initial gather seems to surprise people and they decide that Incrementals are 'slow'.

 

 

2.   Incrementals are a replacement for GRANULARITY=>'GLOBAL AND PARTITION' and not 'PARTITION'! Expecting an option which gathers Partition stats and then goes around updating synposes to perform as well as a simple partition gather is unrealistic*. Any performance improvement needs to be measured against both gathering the Partition statsand maintaining the Global stats. Incrementals will almost definitely be quicker than that! I prefer to think of Incrementals not so much as a performance improvement (because most people probably didn't regather Global statistics every time they gathered individual Partition statistics because they didn't have the time on an active system), but an improvement to the quality of your Global stats because you can now afford to maintain them with the same frequency as your Partition stats, rather than scheduling an out-of-hours Global stats gather or depending on the inaccurate NDVs that result from the previous aggregation process.

 

我的翻译: 

 

1、第一次在表上实施统计信息增量收集时,Oracle必须将整张表爬一遍,以建立最初的摘要(Synopsis)。这对我来说是显而易见的–你怎么可以在摘要(synopsis)还没有建立的情况下,建立基于这些接要的增量统计信息呢?但是长时间的初始收集看起来很令人吃惊,以致于他们认为增量统计信息收集“很慢”。

 

2、增量统计信息收集是用来取代GRANULARITY=>'GLOBAL AND PARTITION',而不是'PARTITION'!期待一个选项,收集分区的统计信息然后顺便更新摘要(synopsis),和简单的分区统计信息收集的性能一样好,是不现实的。(我的理解:取代'GLOBAL AND PARTITION'的增量收集,性能要比'PARTITION'略差,是正常的。)任何(统计信息收集的)性能的提升,需要综合考虑分区统计信息的收集(Partitions Stats)以及全局统计信息(Global Stats)的维护。增量收集几乎可以确定要比那个('GLOBAL AND PARTITION')快!我倾向于认为增量收集,并不是性能的提升(因为大多数人很可能不会每次收集单独分区的统计信息时候,同时搜集全局统计信息,因为在生产系统上他们没有足够的时间),而一个全局统计信息质量的提升。因为现在你可以按照维护分区统计信息(Partition Stats)的频率去维护他们(全局统计信息 Global Stats),而不是专门按排一个时间来收集全局统计信息(Global Stats),或者是依赖于上一次汇总过程得到的不准确的NDV(Number of Distinct Value)值。

你可能感兴趣的:(oracle,table,System,Build,performance,statistics)