Fragmenting a Table Using an Expression
Distribution Scheme
An expression-based distribution scheme distributes table data across
multiple dbspaces according to conditions that you define.
To fragment a table using the
expression scheme
- In the Table Editor, click the General
tab.
- Select Fragmented from the Table Location
list box.
- Select Expression from the Distribution
Scheme list box.
The Expression grid appears, with an empty row. If there is no empty row,
then all dbspaces are currently being used by the table.
- Click an empty row in the DBSpace column
of the Expression grid to add dbspaces.
A DBSpaces drop-down list box appears, listing the dbspaces that are not used
by the table.
- Select the appropriate dbspace and
repeat, as necessary.
- Enter the expression definition for
each dbspace in the Expression column.
- In the Remainder DBSpaces drop-down
list box, select the dbspace in which to store the table rows that are not
defined in the expression definitions.
(Only the dbspaces that are not specified in the DBSpace column of the Expression
grid are listed.)
- Choose Table->Execute to save the
table to the database.
Tips
- Each dbspace in the Expression grid
must have a definition. The expression definition must contain columns from
the current table and data values from a single row. Subqueries, stored
procedures, date and time functions, and aggregates are not allowed in an
expression definition. The maximum length is 256 bytes.
- If an expression distribution scheme
is specified and the columns are renamed, the Table Editor reloads the table
and index after the table is saved.
- If you change or add expressions to
the table's fragmentation scheme and rename columns before saving the table,
you must use the new column names in all of the expressions.