NonStop SQL/MP Reference Manual

Table Of Contents
NonStop SQL/MP Reference Manual142115
Z-20
Examples—=_SQL_TM_node_vol
NonStop SQL/MP normally places temporary tables on the same volume as the
outermost table in a join. See Temporary Tables on page T-3 for more information
about temporary table placement.
The disk process normally uses SYNCDEPTH 0 to access temporary NonStop
SQL/MP tables. This approach saves the overhead of checkpointing operations on
the tables to the backup DP2 process but can result in error 122 if a DP2 takeover
occurs during execution of a statement.
You can use =_SQL_TM_node_vol to specify SYNCDEPTH 1 for temporary
tables if avoiding a potential error 122 justifies the performance penalty for your
application.
=_SQL_TM_node_vol affects temporary tables for both serial and parallel plans.
If a =_SQL_EXE_USE_SWAPVOL DEFINE exists, =_SQL_TM_node_vol
overrides its effect for any temporary files on the specified system and volume.
If ServerWare SMF is installed on your node and a query references a table by its
logical name, you can use =_SQL_TM_node_vol to do one of the following:
°
Locate temporary tables on a particular physical volume in the same virtual
volume as the table
°
Locate temporary tables on a different virtual volume than the table
For parallel queries, only physical volumes are candidates for temporary tables. If
you specify a virtual volume for =_SQL_TM_node_vol when parallel execution
is on, the optimizer ignores this DEFINE.
Examples—=_SQL_TM_node_vol
The following TACL command directs NonStop SQL/MP to create all temporary
tables that would normally go to volume \A.$B on volume \X.$Y instead:
31> ADD DEFINE =_SQL_TM_A_B, CLASS MAP, FILE \X.$Y.Z.NOFILE;
The following TACL command directs NonStop SQL/MP to create all temporary
tables that would normally go to volume \NY.$HDQ on volume \NY.$SCR instead
and to use SYNCDEPTH 1 for the tables rather than the usual SYNCDEPTH 0:
32> ADD DEFINE =_SQL_TM_NY_HDQ, FILE \NY.$SCR.TMP.SYNC1
Both DEFINEs shown in the previous examples can exist simultaneously, directing
different sets of temporary tables to different locations. To redirect temporary tables
to normal locations, delete the DEFINEs with the following commands:
35> DELETE DEFINE =_SQL_TM_A_B
36> DELETE DEFINE =_SQL_TM_NY_HDQ