NonStop SQL/MP Reference Manual

Table Of Contents
NonStop SQL/MP Reference Manual142115
C-69
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
Scope of 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 NonStop SQL/MP programming
manual for your host language.
Determining whether parallel execution is chosen
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.
CONTROL EXECUTOR PARALLEL EXECUTION { ON | OFF }