Static Sql Statements; Dynamic Sql Statements - HP NonStop SQL/MP Programming Manual

For c
Table of Contents

Advertisement

Explicit Program Compilation
Use of execution-time name resolution to resolve names in execution plans
when the SQL statement executes rather than during explicit SQL compilation
or at SQL load time
CONTROL TABLE
controls these performance-related options for accessing tables and views:
Selection of access paths, join methods, join sequences, and lock types
Selection of block buffering and block splitting algorithms
Action to take for locked data or unavailable partitions
Opening of indexes and partitions at the initial access to a table
Checkpointing of unaudited write operations
For the syntax of each CONTROL directive, see the SQL/MP Reference Manual.

Static SQL Statements

Follow these guidelines when you use a static CONTROL directive with static SQL
statements in a C program:
The scope of a static CONTROL directive is the program's current RTDU. An SQL
map shows each RTDU. To generate an SQL map in the C compiler listing, specify
the SQLMAP option in the SQL directive.
A static CONTROL directive affects all subsequent static SQL statements that
follow in listing order (regardless of execution order) as follows:
Global Scope––In the global scope of a C program (that is, outside of any
functions), a static CONTROL directive affects only SQL statements that follow
in listing order and are not within a function. It does not affect SQL statements
within a function.
Functions––Within a C function (which is a unique RTDU), a CONTROL
directive affects subsequent static SQL statements in the function in listing
order until the end of the function or until another CONTROL directive resets
the directive. A static CONTROL directive outside of a function does not affect
SQL statements in the function.
A CONTROL directive coded within flow-control statements (for example, IF and
ELSE) applies to static SQL statements in the listing order regardless of the
execution order.
To affect a cursor, you must code the CONTROL directive before the DECLARE
CURSOR statement (and in the same RTDU as the DECLARE CURSOR
statement).
A dynamic CONTROL directive does not affect static SQL statements in the
program except as described under
HP NonStop SQL/MP Programming Manual for C—429847-008

Dynamic SQL Statements

6-36
Static SQL Statements
on page 6-36.

Advertisement

Table of Contents
loading

Table of Contents