NonStop SQL/MP Reference Manual

Table Of Contents
NonStop SQL/MP Reference Manual142115
C-72
Considerations—CONTROL QUERY
Considerations—CONTROL QUERY
Scope of CONTROL QUERY
An option you set with CONTROL QUERY stays in effect for the compilation of all
statements and commands (including prepared ones) until another CONTROL
QUERY directive resets that option or until the SQLCI or host language process
stops.
In host language programs, other scoping rules might also apply to the use of
CONTROL QUERY. For more information, see the NonStop SQL/MP
programming manual for your host language.
Examples—CONTROL QUERY
The following directive tells SQL to bind names in subsequent statements at
execution time and prohibits the use of hash joins for subsequent queries:
CONTROL QUERY BIND NAMES AT EXECUTION HASH JOIN OFF;
The following directive ensures that SQL considers hash joins for subsequent
queries even if Tandem changes the default behavior regarding the use of hash joins:
CONTROL QUERY HASH JOIN ENABLE;
The following directive tells SQL to optimize subsequent queries for returning the
first rows in the result:
CONTROL QUERY INTERACTIVE ACCESS ON;
The following directive tells SQL to enable MDAM for the query:
CONTROL QUERY MDAM ON;
The following directive resets all CONTROL QUERY options to the default state:
CONTROL QUERY HASH JOIN SYSTEM INTERACTIVE ACCESS OFF
BIND NAMES AT STARTUP;
CONTROL TABLE Directive
CONTROL TABLE is a DCL directive that specifies performance-related options for
DML accesses to a table or view. CONTROL TABLE affects decisions the SQL
compiler makes about how to execute DML statements.
CONTROL TABLE affects the selection of access paths, join methods, join sequences,
lock types, and block buffering and block splitting algorithms. CONTROL TABLE also
specifies whether to open indexes and partitions at the initial access to a table, whether