Most maintenance operations are either simple or complex.
A simple operation
requires only a single command and
can be performed without unloading and reloading tables.
The following commands perform simple operations:
CREATE INDEX or DROP INDEX
ALTER DBEFILE (from INDEX or TABLE to MIXED)
A complex operation
requires a series of commands that
remove data from an object before modifying the
object in some way and then reloading it.
The following tasks require complex operations:
Changing a DBEFile from MIXED to INDEX or TABLE
Regrouping data to improve performance
Merging two existing tables
Splitting an existing table into two tables
Merging two columns in a table
Modifying a column in an existing table
Reloading tables to improve index performance
A complex operation generally uses the UNLOAD and
LOAD commands in combination with some other procedure,
or else it uses the INSERT
statement with a newly created table and a SELECT statement that
specifies columns in an old table or tables.
Many maintenance tasks can be performed
using more than one kind of operation, so you must often decide
which to use in a given case.
The next few sections
show how to use both simple and
complex operations to carry out a variety of tasks in database
maintenance.