HPlogo ALLBASE/SQL Database Administration Guide: HP 3000 MPE/iX Computer Systems > Chapter 7 Maintenance

Using Simple and Complex Maintenance Operations

» 

Technical documentation

Complete book in PDF
» Feedback

 » Table of Contents

 » Index

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:

  • ALTER TABLE

  • CREATE INDEX or DROP INDEX

  • ALTER DBEFILE (from INDEX or TABLE to MIXED)

  • MOVEFILE

  • DROP or CREATE VIEW

  • ADD TO GROUP

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:

  • Dropping a DBEFile

  • 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.

Feedback to webmaster