SQL/MX 2.x Installation and Management Guide (G06.24+, H06.03+)
Adding, Altering, and Dropping SQL/MX Database
Objects
HP NonStop SQL/MX Installation and Management Guide—523723-004
9-32
Dropping Partitions
2. Determine the name of the table for which you want to drop the index.
3. Use the DISPLAY USE OF command to identify which user modules are
associated with this object. See the similarity check criteria in the SQL/MX
Programming Manual for C and COBOL and the SQL/MX Programming Manual for
Java to determine if your changes are likely to cause similarly check to fail and
force automatic recompilation. If they will, you should SQL compile these modules
after making the changes to avoid expensive automatic recompilations at run time.
SQL applications that are running while you make these changes will still undergo
automatic recompilation.
For information about explicit and automatic recompilation, see the SQL/MX
Programming Manual for C and COBOL and the SQL/MX Programming Manual for
Java. For information about using DISPLAY USE OF, see Checking Module
Dependencies With DISPLAY USE OF on page 11-20 and the SQL/MX Reference
Manual.
4. Enter the DROP INDEX statement.
5. Revise the application source code as needed to reflect your changes to the
database. Process and compile the updated source file. For more information, see
the SQL/MX Programming Manual for C and COBOL and the SQL/MX
Programming Manual for Java.
If you plan to use the TMF subsystem for recovering an index, see Recovering Views
and Indexes on page 12-21.
For more information and examples of dropping indexes, see the SQL/MX Reference
Manual.
Dropping Partitions
Use the MODIFY utility to drop a range partition or hash partition in a table or an index.
To drop only the data within a partition and leave partition itself intact, use the
PURGEDATA utility. For more information, see Using MODIFY to Manage Table and
Index Partitions on page 10-9 and Using PURGEDATA to Delete Data From Tables on
page 10-35.
Determining When to Drop a Partition
When all information in a partition becomes obsolete, or when a database design
deficiency leaves a partition continually empty, a reference to a table or index defined
across this partition request results in a correspondingly longer access time to the table
or index. In such circumstances, you might want to drop this partition while leaving the
others defined for the object intact.
Guidelines for Dropping Partitions
You can drop table and index partitions within these guidelines: