Mittwoch, April 27, 2011

Table Expansion

Eine weitere Erläuterung des CBO-Entwicklungsteams, diesmal zum Thema Table Expansion:
Table expansion allows the optimizer to generate a plan that uses indexes on the read-mostly portion of the data, but not on the active portion of the data. Hence, DBAs can configure a table so that an index is only created on the read-mostly portion of the data, and will not suffer the overhead burden of index maintenance on the active portions of the data. This is the high-level idea of what table expansion does. In practice, the way we can delineate active and inactive portions of the data is using partitioning. A local index can be defined on a table, and marked unusable for certain partitions. The partitions for which the index is unusable are in effect not indexed.
Klingt im ersten Moment vielleicht etwas komplizierter als es ist: man markiert einfach die lokalen Indizes der veränderlichen (also aktuellen) Partition(en) und kann auf historische (also unveränderliche) Daten problemlos über den Index zugreifen, während der Zugriff auf die aktuellen Daten via FTS erfolgt. Intern wird die Query also in zwei Teile gesplittet, was im Exceution Plan klar zu erkennen ist. Das Verfahren ähnelt ein wenig der vor kurzem erläuterten OR-Expansion.

Keine Kommentare:

Kommentar veröffentlichen