SQL/MP Installation and Management Guide
Reorganizing Tables and Maintaining Data
HP NonStop SQL/MP Installation and Management Guide—523353-004
8-2
Reorganizing a Database Online
°
The table is reorganized within the physical or partition structure that already
exists; with RELOAD, data is reorganized within the current structure only.
°
The table cannot use index or data compression.
•
Reorganizing a table offline with the SQLCI LOAD or COPY command:
°
If the table is relative or entry-sequenced, this second method must be used. If
the table is key-sequenced, the offline method can be used as an alternative to
the online reorganization method.
°
If you use the LOAD command, the table must not be audited by the TMF
subsystem. If you use COPY, the table can be audited.
°
If the object is a relative or entry-sequenced table, it must be repartitioned.
°
If the table has a new physical column layout, caused by adding or dropping a
column in the middle of the table, this reorganization method must be used.
The new table layout must be created; then, the data from the old table must
be loaded or copied into the new table.
For more information about using LOAD and COPY, see Loading, Copying,
Appending, and Purging Data on page 8-7.
•
Reorganizing values stored in a multipartitioned key-sequenced table or index by
moving or splitting partitions or by redefining row boundaries:
°
An existing partition of a key-sequenced table or index can be moved, split, or
merged with another partition by using the ALTER TABLE (or ALTER INDEX)
PARTONLY MOVE statement, as explained under Splitting, Moving, and
Merging Partitions on page 7-20.
°
Empty partitions can be added to an SQL table.
Reorganizing a Database Online
You can reorganize only key-sequenced, audited tables online. If the table you need to
reorganize is not of this type, you must use the offline approach described under
Loading, Copying, Appending, and Purging Data
on page 8-7.
Reorganizing Key-Sequenced Files
The RELOAD command of FUP lets you reorganize a key-sequenced file while the file
remains available for use by the application. The RELOAD operation physically
restructures the file to improve access performance and space usage. The result of
RELOAD is equivalent to using a LOAD command to load the source file to a target file
of the same format. The RELOAD command, however, allows for shared read-write
access to the file during the operation.