SQL/MP Reference Manual
HP NonStop SQL/MP Reference Manual—523352-013
C-73
CONTROL EXECUTOR Directive
CONTROL EXECUTOR Directive
CONTROL EXECUTOR is a DCL directive that allows or prohibits parallel execution of
queries. Parallel execution can decrease the elapsed time for processing a query.
ON
executes queries in parallel using multiple SQL executors if parallel execution is
possible and efficient.
OFF
executes queries using one SQL executor.
OFF is the default.
Considerations—CONTROL EXECUTOR
CONTROL EXECUTOR affects the way SQL executes DML statements. It does
not affect other types of statements.
In SQLCI, CONTROL EXECUTOR remains in effect until you enter another
CONTROL EXECUTOR directive or end the SQLCI session.
In a host language program, other scoping rules might also apply to CONTROL
EXECUTOR. For more information, see the SQL/MP programming manual for your
host language.
Specifying ON does not force parallel execution to occur. The optimizer still
analyzes the query to determine whether a parallel plan has a lower cost than a
serial plan. In addition, under certain conditions parallel execution is inappropriate
or not currently supported. These conditions include:
The query uses a cursor update. Cursor updates are not supported in parallel
because row currency cannot be maintained in a parallel plan.
The DML statement includes a UNION operation.
None of the tables in the query are partitioned.
To find out if parallel execution is chosen in a particular case, use EXPLAIN.
Example—CONTROL EXECUTOR
This example shows an equijoin operation:
CONTROL EXECUTOR PARALLEL EXECUTION ON;
SELECT CUSTOMER.CUSTNUM, CUSTOMER.CUSTNAME
FROM =CUSTOMER, =ORDERS
CONTROL EXECUTOR PARALLEL EXECUTION { ON | OFF }