HP 3000 Manuals

Ch 3. Guidelines on Query Design [ ALLBASE/SQL Performance and Monitoring Guidelines ] MPE/iX 5.0 Documentation


ALLBASE/SQL Performance and Monitoring Guidelines

Chapter 3  Guidelines on Query Design 

Careful query design is of primary importance for performance.  In most
queries, the most efficient retrieval of data occurs when an index is
used.[REV BEG] By default, the ALLBASE/SQL query optimizer decides
whether to use an index or not, and if so, it decides which one to use.
However, you can override the query optimizer's choice with the SETOPT
statement.[REV END] Also, through careful query design, you can ensure
that the optimizer is able to choose an available index.  Topics included
in this chapter are as follows:

   *   Avoiding Serial Scans Through Query Design.
   *   Using Subqueries.
   *   Using UNION.
   *   Using MIN/MAX Functions in Predicates.
   *   Using OR Predicates.
   *   Using Predicates with LIKE.
   *   Using Predicates with BETWEEN.
   *   Using Fetch Unique Scans.
   *   Updating Key Columns.
   *   Avoiding User Propagation of Filters.
   *   Using TID Scans.
   *   Using Parallel Serial Scans.
   *   Using the BULK Option.
   *   Analyzing Queries with GENPLAN.[REV BEG]
   *   Modifying the Access Optimization Plan with SETOPT[REV END]



MPE/iX 5.0 Documentation