SQL/MX 2.x Database and Application Migration Guide (G06.23+, H06.04+, J06.03+)

Converting SQL/MP Applications to SQL/MX
Applications
HP NonStop SQL/MX Database and Application Migration Guide540435-005
10-19
Transaction Control Statements
CONTROL QUERY Directives
In NonStop SQL/MP, the CONTROL QUERY compiler directive controls plans for
queries. Options specify whether to resolve names at execution time or startup time,
whether to include hash join algorithms considered for executing queries, and whether
to optimize query response time for returning a few rows or all rows. In NonStop
SQL/MX, the CONTROL QUERY directive has been changed to CONTROL QUERY
DEFAULT. Many options have been changed.
The next table lists the SQL/MP CONTROL QUERY directives. More information about
default settings is provided in the
SQL/MX Reference Manual and the SQL/MX Query
Guide.
Transaction Control Statements
All SQL/MP transaction control statements are supported in NonStop SQL/MX.
Table 10-5
lists the SQL/MP transaction control statements that are supported in
NonStop SQL/MX:
In NonStop SQL/MX and NonStop SQL/MP, to ensure that a sequence of statements
either executes successfully or not at all, use the BEGIN WORK and COMMIT WORK
statements to define a transaction containing these statements. To abort the
transaction, use the ROLLBACK WORK statement.
Table 10-4. CONTROL QUERY Directives
SQL/MP CONTROL QUERY
Directives
How NonStop SQL/MX
Affects the Same
Functionality Comments
BIND NAMES Internally handled in the
compiler. No external
control.
HASH JOIN CONTROL QUERY SHAPE
to force
See Forcing Query
Execution Plans on
page 10-59.
INTERACTIVE ACCESS ON Not implemented.
MDAM CONTROL TABLE or
CONTROL QUERY SHAPE
to force off
ON by default; see Forcing
Query Execution Plans on
page 10-59.
Table 10-5. SQL/MX and SQL/MP Transaction Control Statements
SQL/MP Transaction
Control Statements
Implemented
in SQL/MX? Comments
BEGIN WORK Yes
COMMIT WORK Yes
ROLLBACK WORK Yes