The new table is a hash-fragmented table if the surviving_table had hybrid fragmentation and the detached dbslice has more than one fragment. In a hybrid-fragmented table, the dbslice is detached if you specify any dbspace in that slice. For example, see the sales_info table discussed in the Hybrid Fragmentation Distribution Scheme (XPS). Once the January 1997 data is available in sales_info, you might archive year-old sales_info data.
ALTER FRAGMENT ON TABLE sales_info DETACH sales_slice_9601.1 jan_96
In this example, data from January 1996 is detached from the sales_info table and placed in a new table called jan_96.
The INIT clause of the ALTER FRAGMENT statement can define or modify the fragmentation strategy or the storage location of an existing table or (for Dynamic Server) an existing index. The INIT clause has the following syntax.
INIT Clause: |--INIT--+--------------------+---------------------------------> | (1) | '--------WITH ROWIDS-' (2) >--+-| FRAGMENT BY Clause for Tables |-----------------------+--| +-+----------------------------+-- IN--+-dbspace--------+-+ | | (1) | | (3) | | | '--------PARTITION--fragment-' '--------dbslice-' | | (1) (4) | '--------| FRAGMENT BY Clause for Indexes |---------------'
Element | Description | Restrictions | Syntax |
---|---|---|---|
dbslice | Dbslice storing fragmented data | Must exist at time of execution | Identifier |
dbspace | Dbspace storing fragmented data | Must exist at time of execution | Identifier |
fragment | Partition within dbspace | No more than 2048 for same table | Identifier |
The INIT clause can accomplish tasks that include the following:
With Extended Parallel Server, you cannot use the INIT clause to change the fragmentation strategy of a table that has a GK index.
When you use the INIT clause to modify a table, the tabid value in the system catalog tables changes for the affected table. The constrid value of all unique and referential constraints on the table also changes.
For more information about the storage spaces in which you can store a table, see Using the IN Clause.