MDC addresses these drawbacks. Data is clustered physically in multiple
dimensions. The indexes for each dimension are not record based but block
based, thus reducing their size (and effort needed for logging and maintaining)
dramatically. Reorganization of the table in order to re cluster is not necessary.
At the bottom line, MDC provides a powerful method for improving the
performance of
SELECT
,
INSERT
,
UPDATE
, and
DELETE
statements.
Example 10 10 shows the
CREATE TABLE
statement of an MDC table clustered in
two columns:
Region
and
Year
. The block indexes for each dimension are created
automatically.
Example 10 10 Creating an MDC table
CREATE TABLE sales (
Customer VARCHAR(80),
Region CHAR(5),
Year INT
)
ORGANIZE BY DIMENSIONS (Region, Year);
Figure 10 4 shows the data clustering according to two dimensions as defined in
Example 10 10. Actually, the number of dimensions for a table is only limited by
the system size.
Dimension
Dimension
Block Index
Block Index
East, 1993
East, 1996
North, 1996
Region
North, 1997
Year
North, 1998
South, 1999
Extent (Four pages)
Data
Data
Figure 10 4 MDC table and indexes
332
MySQL to DB2 UDB Conversion Guide
footer
Our partners:
PHP: Hypertext Preprocessor Cheap Web Hosting
JSP Web Hosting
Ontario Web Hosting
Jsp Web Hosting
Cheapest Web Hosting
Java Hosting
Cheapest Hosting
Visionwebhosting.net Business web hosting division of Vision Web Hosting Inc.. All rights reserved