You can place as many rows into a fragment as the available space in the partition, dbspace, or dbslice allows.
Use the ATTACH clause of the ALTER FRAGMENT ON TABLE statement to combine tables that have identical structures into a fragmentation strategy.
ATTACH Clause: |--ATTACH-------------------------------------------------------> .-,-----------------------------------------------------------------------------------------------------------. V (1) | >----+--------surviving_table-+--+-----------------------------------------------------------------------------+-+--| '-consumed_table---------' | (3) | '-AS--+----------------------------+--+-expr--+----------------------+------+-' | (2) | | | .-AFTER--. | | '--------PARTITION--new_frag-' | '-+--------+--old_frag-' | | '-BEFORE-' | | (1) (2) | '---------------REMAINDER-------------'
Element | Description | Restrictions | Syntax |
---|---|---|---|
consumed
_table |
Table that loses its identity to be merged with surviving_table | Must exist. Cannot include serial columns nor unique, referential, or primary key constraints. See also General Restrictions for the ATTACH Clause. | Database Object Name |
expr | Expression defining which rows are stored in a fragment of a fragmented-by-expression table | Can include only columns from the current table and only data values from a single row. See also General Restrictions for the ATTACH Clause. | Condition ;
Expression |
new_frag | Name declared here for consumed_table fragment. Default is the dbspace name. | Must be unique among the names of partitions and of dbspaces that store fragments of surviving_table | Identifier |
old_frag | Partition or dbspace where a surviving_table fragment exists | Must exist. See also Altering Hybrid-Fragmented Tables (XPS). | Identifier |
surviving
_table |
Table on which to modify the distribution or storage location | Must exist. Cannot have any constraints. See also Restrictions on the ALTER FRAGMENT Statement. | Database Object Name |
To use this clause, you must have the DBA privilege or else be the owner of the specified tables. The ATTACH clause supports the following tasks:
(See Combining Nonfragmented Tables to Create a Fragmented Table.)