Attaching unfragmented tables together

You can take advantage of the performance benefits of the ALTER FRAGMENT ATTACH operation when you combine two unfragmented tables into one fragmented table.

For example, suppose you create two unfragmented tables and indexes with the following SQL statements:
CREATE TABLE tb1(a int) IN db1; 
   CREATE INDEX idx1 ON tb1(a) in db1;
CREATE TABLE tb2(a int) IN db2; 
   CREATE INDEX idx2 ON tb2(a) in db2;
You might want to combine these two unfragmented tables with the following sample distribution scheme:
ALTER FRAGMENT ON TABLE tb1 
   ATTACH 
      tb1 AS (a <= 100),
      tb2 AS (a > 100);
If no data migrates between the fragments of tb1 and tb2, the database server redefines index idx1 with the following fragmentation strategy:
CREATE INDEX idx1 ON tb1(a) F
   FRAGMENT BY EXPRESSION
      a <= 100 IN db1,
      a > 100 IN db2;
Important: This behavior results in a different fragmentation strategy for the index prior to version 7.3 and version 9.2 of the database server. In earlier versions, the ALTER FRAGMENT ATTACH statement creates an unfragmented detached index in the dbspace db1.