HP 3000 Manuals

Sections and Validation [ ALLBASE/SQL Performance and Monitoring Guidelines ] MPE/iX 5.0 Documentation


ALLBASE/SQL Performance and Monitoring Guidelines

Sections and Validation 

A section is a stored representation of an access path chosen by the
optimizer.  Sections are created by SQLCore when you do the following:

   *   Preprocess an application using the ALLBASE/SQL preprocessors.
   *   Issue a statement in ISQL.
   *   Use dynamic operations in an application.  Such operations are
       built using the PREPARE and EXECUTE statements.
   *   Issue a CREATE PROCEDURE statement.
[REV BEG]

Sections are one of three types, depending on how you create them:

   *   Permanent sections, stored in the system catalog.
   *   Semi-permanent sections, deleted from memory after your session
       ends.
   *   Temporary sections, deleted from memory after your transaction
       ends.[REV END]

Permanent sections are stored for non-dynamic statements you include in
preprocessed applications.  These sections are located in a system table
called HPRDBSS.STOREDSECT, and their names are listed in the
SYSTEM.SECTION view.  You cannot access HPRDBSS.STOREDSECT, since it is
an ALLBASE/SQL internal table.

Section Caching 

Reading sections into memory from the system catalog at run time can
cause a lot of I/O activity.  Section caching allows sections to remain
in memory between transactions.  By default, up to 12 sections can be
cached.  Refer to the "System Administration" chapter for information
about changing these defaults.

Validation 

A section becomes invalid when something it depends on is no longer as it
was when the section was originally marked valid.  For example, a section
containing a query on a particular table will be marked invalid if an
index on that table is dropped, or when the UPDATE STATISTICS statement
is used on the table.

A status of VALID means the section contains an appropriate access path
for getting to data; a status of INVALID means the access path may no
longer be appropriate.

When a section becomes invalid, it must be revalidated before it can be
used again.  SQLCore attempts to validate application program sections at
run time.  If a necessary section cannot be revalidated, an error
results.  During revalidation, exclusive locks are obtained on the system
catalog base tables HPRDBSS.SECTION, HPRDBSS.STOREDSECT, and
HPRDBSS.DEPENDENCY.

You can use the VALIDATE statement to revalidate sections singly or in
groups at any time, such as after issuing the UPDATE STATISTICS
statement.  For best performance, issue all the UPDATE STATISTICS
statements first, then issue all the VALIDATE statements.  This ensures
that you only invalidate and revalidate a section once, even if it is
dependent on several tables.



MPE/iX 5.0 Documentation