SQL/MP Reference Manual
HP NonStop SQL/MP Reference Manual—523352-013
C-76
Considerations—CONTROL QUERY
If you define a table with a clustering key and use a protection view, you will not be
able to use MDAM. For more information, see Protection View on page P-32.
Considerations—CONTROL QUERY
Static control statements affect only those SQL statements that follow them and are
located within the same scope. For example, in the global area or a specific procedure.
Dynamic control statements have temporal scoping. For example, they apply to all
dynamic SQL statements that are prepared by any procedure in the entire program
after the dynamic control statement is executed. The only exception to this rule is a
dynamic CONTROL TABLE TIMEOUT statement that effects on all static statements in
the program, and on all dynamic control statements that are prepared before and after
the execution of the dynamic CONTROL TABLE TIMEOUT statement.
Examples—CONTROL QUERY
This 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;
This directive ensures that SQL considers hash joins for subsequent queries even
if HP changes the default behavior regarding the use of hash joins:
CONTROL QUERY HASH JOIN ENABLE;
This directive tells SQL to optimize subsequent queries for returning the first rows
in the result:
CONTROL QUERY INTERACTIVE ACCESS ON;
This directive tells SQL to enable MDAM for the query:
CONTROL QUERY MDAM ON;
This directive resets all CONTROL QUERY options to the default state:
CONTROL QUERY HASH JOIN SYSTEM INTERACTIVE ACCESS OFF
BIND NAMES AT STARTUP;