You can detach an index from a table-fragmentation strategy with the INIT clause of the ALTER TABLE FOR INDEX statement, so that an attached index becomes a detached index. This breaks any dependency of the index on the table fragmentation strategy. If the INIT clause specifies only IN dbspace or PARTITION fragment IN dbspace for a previously fragmented index, or specifies an index fragmentation strategy that differs from the storage option of the table, then the index becomes a detached index.
Use the ADD clause to add another fragment to an existing fragment list for a table or (for Dynamic Server only) for an index.
ADD Clause: |--ADD----------------------------------------------------------> >--+-+------------------------------------------+--+----------------------------+--dbspace-+--| | '-+------------------------+--REMAINDER IN-' | (1) | | | | (1) | '--------PARTITION--part--IN-' | | '--------PARTITION--part-' | '-+------------------------+--expression--IN--dbspace--+----------------------+---------' | (1) | '-+-BEFORE-+--fragment-' '--------PARTITION--part-' '-AFTER--'
Element | Description | Restrictions | Syntax |
---|---|---|---|
fragment | Name of an existing fragment in the fragmentation list | Must exist at the time when you execute the statement | Identifier |
expression | Expression that defines the new fragment that is to be added | Must return a Boolean value (t or f) | Condition ; Expression |
dbspace | Name of dbspace to be added to the fragmentation scheme | Must exist at the time when you execute the statement | Identifier |
part | Name that you declare here for the fragment. The default name is the name of the dbspace | Required for any partition in the same dbspace as another partition of the same index | Identifier |
The expression can contain column names only from the current table and data values only from a single row. No subqueries or aggregates are allowed. In addition, the built-in current, date, and time functions are not valid here.
Enterprise Edition Home | Express Edition Home | [ Top of Page | Previous Page | Next Page | Contents | Index ]