Databases Reference
In-Depth Information
The following example illustrates an MDC table with two dimensions: region and
year. Each row below is a cell. For example, East, 1993 is a cell and North, 1997 is
another cell. You can see how the data does not need to be duplicated in order to
achieve MDC because each unique combination of region and year has its own “cell.”
Because the database indexes over blocks instead of indexing over individual records the
block indexes will have a small fraction of the number of entries.
Figure 8.3
Blocks making up an MDC table with dimensions region and year.
The following examples illustrate how MDC with block indexing leads to elegant
access patterns that mesh well with classical relational database management system
(RDBMS) storage structures.
Example 1: Assume an MDC Table with Dimensions on Color and Nation
SELECT * FROM mdctable WHERE Color='Blue' AND
Nation='USA'
Sequence:
1.
Dimension block index lookup.
2.
Block ID ANDing (Figure 8.4).
3.
Minirelation scan of only the resulting blocks in the table.
The DB2 implementation was chosen by its designers for its ability to coexist with
other database features such as row-based indexes, table constraints, materialized views,
and high-speed loading. The benefit of these coexistence properties, for example, allows
Search WWH ::




Custom Search