SQL/MX 2.x Installation and Management Guide (H06.10+, J06.03+)
Reorganizing SQL/MX Tables and Maintaining Data
HP NonStop SQL/MX Installation and Management Guide—544536-007
10-44
DUP versus FASTCOPY
the fastcopy operation. Because the source index SI2 has no equivalent target index, it
does not participate in the fastcopy operation.
FASTCOPY TABLE ST TO TT INDEXES EXPLICIT;
The following command copies all the rows from source index SI1 to the target index
TI1.
FASTCOPY INDEX SI1 to TI1;
The base table TT can be accessed only after completing the fastcopy operation
(copying of indexes SI1 to TI1). If you try to access the table without completing the
fastcopy operation (by copying the index explicitly), it returns the following error:
ERROR[8580] No partitions of table could be accessed
DUP versus FASTCOPY
Table 10-2 lists the differences between the DUP and FASTCOPY commands.
Table 10-2. Difference Between DUP and FASTCOPY Commands
DUP FASTCOPY
Copies tables and indexes in a single
command.
Copies tables and indexes conveniently using a
single command. Also, it might copy tables and
indexes using separate commands.
Creates the target table identical to the
source table.
Requires the target table to exist in advance, and
to be similar but not necessarily identical to the
source table based on the following aspects:
•
number of columns must be the same in
source and target tables
•
column data types must be compatible
between columns with the same ordinal
position in the row
•
either both tables have a system-defined
SYSKEY column, or none of them have a
SYSKEY column
•
if the target table has indexes, the following
details must match in the source and target
tables:
°
clustering key specifications
°
index column specifications
Copies tables and indexes faster but
in an inflexible manner.
Copies tables and indexes slower but in an
efficient and flexible manner.










