SAS Safety Scalable Performance Data Server 4.5 Manual Do Utilizador

Página de 271
concurrent SPD Server users. Why is only one domain enough? The SQL Query Rewrite
Facility uses the SPD Server TEMP=YES option setting when accessing the LIBNAME
domain for intermediate result tables. The TEMP=YES option creates a processing
environment where multiple SPD Server users can concurrently create tables with no name
or resource contention issues. The TEMP=YES option also automatically cleans up the
contents of the working storage area when users close their SPD Server session in a normal
fashion.
SPD Server administrators and users can both specify LIBNAME domains for SQL Query
Rewrite Facility intermediate results storage. SPD Server administrators can configure use
the TMPDOMAIN= parameter in the spdsserv.parm file to specify the SQL Query Rewrite
Facility intermediate results storage domain:
TMPDOMAIN=<DomainName>;
where <DomainName> is the name of a LIBNAME domain that is defined in the SPD
Servers associated libnames.parm file.
SPD Server users can override the primary TMPDOMAIN= location by specifying their
own LIBNAME domain for SQL Query Rewrite Facility intermediate results storage.
Users specify their own LIBNAME domain by using the pass-through SQL RESET
command with the TMPDOMAIN= option. For example, if an individual SPD Server user
wanted to use the EMATMP LIBNAME domain for SQL Rewrite Facility intermediate
results, the user would submit the following RESET command in his or her SQL job stream:
execute(reset tmpdomain=ematmp) by sasspds;
Setting TMPDOMAIN=EMATMP causes the EMATMP domain to take precedence over
the TMPDOMAIN= setting that was specified in the spdsserv.parm file. Any LIBNAME
domain that that an individual user submits as an SQL Query Rewrite storage location must
be defined in the libnames.parm file of the SPD server that runs the pass-through SQL
code.
Reassigning the SQL Query Rewrite Facility intermediate results storage location does not
affect TMP=YES environment setting that permits concurrent access to tables in the
domain by multiple SPD Server users. This means that multiple SPD Server users can
specify and share remapped TMPDOMAIN= locations without table handling or
contention issues.
Note: If the SPD Server parameter TMPDOMAIN is not configured and the SQL query
rewrite is enabled, the query rewrite will fail with the following error:
SPDS_ERROR: Error materializing RWE context.
SQL Query Rewrite Facility Options
The SQL Query Rewrite Facility is enabled by default in SPD Server. That means when
an SPD Server user submits SQL statements that contain sub-expressions that SPD Server
can handle more efficiently by using the SQL Query Rewrite Facility, the software will
optimize the SQL query. RESET options provide control over the SQL Query Rewrite
Facility.
_QRWENABLE Option:
Use the _QRWENABLE reset option to disable the SQL Query Rewrite Facility. You
might use this option if you suspect that the SQL Query Rewrite Facility is not enhancing
90
Chapter 8 • SPD Server SQL Query Rewrite Facility