How to create MDC table on DB2
ORGANIZE BY DIMENSIONS
Multidimensional clustering tables are created by specifying the ORGANIZE BY DIMENSIONS clause of the CREATE TABLE SQL statement when a table is created. The syntax for this optional clause is:
ORGANIZE BY DIMENSIONS ( <(>[ColumnName] ,...<)> ,...)
Example: To create an MDC table named SALES in such a way that its data is organized into extents based on unique combinations of values found in the CUSTOMER, REGION, and YEAR columns, you could do so by executing a CREATE TABLE SQL statement that looks something like this:
CREATE TABLE sales (customer VARCHAR(80), region CHAR(5), year INTEGER) ORGANIZE BY(customer, region, year)