Dienstag, Januar 17, 2012

Inkrementelle Statistiken

Randolf Geist beschäftigt sich in seinem Blog mit den Eigenschaften der in 11g eingeführten inkrementellen Partitions-Statistiken: "The most important point to understand is that Incremental Partition Statistics are not "cost-free", so anyone who is telling you that you can gather statistics on the lowest level (partition or sub-partition in case of composite partitioning) without any noticeable overhead in comparison to non-incremental statistics (on the lowest level) is not telling you the truth." Die angesprochenen Kosten liegen im Bereich der Laufzeiten und beim Speicherplatzbedarf in SYSAUX. Außerdem werden ein paar wichtige Detailbeobachtungen aufgeführt (z.B. wird bei Verwendung von INCREMENTAL die ESTIMATE_PERCENT-Angabe ignoriert).

Ein paar (geringfügig) ältere Stellungnahmen zum Feature hatte ich vor kurzem hier verlinkt.

Nachtrag 21.01.2012: Doug Burns, der dem Thema der Statistiken für Partitioned Tables im Jahr 2010 eine ganze Artikelserie gewidmet hat, gibt in seinem Blog mit Bezug auf Randolfs Aussagen noch zwei Kommentare zu den inkremetellen Statistiken:
  • dass Oracle beim initialen Aufbau von inkrementellen Statistiken die komplette Tabelle lesen muss, um die Synopsis aufzubauen, erscheint selbstverständlich: diese lange Laufzeit ist unvermeidbar
  • "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 stats and maintaining the Global stats. Incrementals will almost definitely be quicker than that!"
Der Vollständigkeit halber noch der Hinweis, dass diese Aussagen keinen Widerspruch zu den Geist'schen Ausführungen darstellen.

Nachtrag 18.03.2012: Maria Colgan erläutert im Blog der CBO-Entwickler, wann eine Erhebung inkrementeller Statistiken erfolgt: "incremental statistics maintenance will gather statistics on any partition, whose data has changed and that change will impact the global level statistics."

Keine Kommentare:

Kommentar veröffentlichen