Use the SPDSEV1T= macro
variable to indicate whether data returned from an SPD Server WHERE
clause evaluations should be in strict row (observation) order.
The macro variables
SPDSEV1T= and SPDSEV2T= work in conjunction with the SPD Server WHERE
clause planner WHINIT.
The variables SPDSEV1T=
and SPDSEV2T= are identical in purpose. You use them to specify the
row order of data returned in WHERE-processing. Which variable the
server exercises depends on the evaluation strategy selected by WHINIT.
The SPDSEV1T= evaluation strategy is indexed. The SPDSEV2T= evaluation
strategy is non-indexed. Avoid using these options unless you absolutely
understand the SPD Server performance tradeoffs that depend on maintaining
the order of data.
If compatibility with
Base SAS software is important, set both SPDSEV1T= and SPDSEV2T= to
0. When both evaluation strategies are set to 0, SPD Server returns
data in row order whether the SPDSEV1T= or the SPDSEV2T= strategy
is selected.
When you use a SAS PROC
to retrieve rows from a sorted table, some SAS PROCs can use the sort
order information to optimize how to receive and process the rows.
For example, if you use PROC SQL to perform table joins on a sorted
table that uses WHERE predicates to filter table rows, then PROC SQL
will use the sort order information to optimize the join strategy.
If you use the default values of SPDSEV1T= and SPDSEV2T= in these
instances, the SAS PROC receives the table rows in sorted order.
If the SAS PROC that
you submit does
not use the
sorted order, the default values of SPDSEV1T= and SPDSEV2T= will restrict
the use of parallel WHERE clauses, which can negatively impact performance.
For example, PROC PRINT and most SAS DATA step code does not take
advantage of sorted tables. If you know that the SAS PROC that you
are submitting does not take advantage of a sorted table, you can
change the setting for SPDSEV1T= or SPDSEV2T= to 2, in order to allow
parallel WHERE evaluations that can improve performance. However,
this should be done with care: a parallel WHERE evaluation does not
guarantee that rows are returned to SAS in sorted order, and this
can cause incorrect results for a SAS PROC that uses that information.
Note: The SPDSEV1T= and SPDSEV2T=
usage that is discussed here does not apply to SQL statements that
are executed via the SPD Server pass-through SQL facility.
Used in
Conjunction with Indexed WHERE clause Evaluation Strategy
Arguments
0
returns data in row
order.
1
might not return the
data in row order. SPD Server can override as needed to force a 0
setting if the table is sorted using PROC SORT.
2
always forces parallel
evaluation regardless of sorted order. May not return data in row
order.
If SPD Server must return
many rows during WHERE clause processing, setting the variable to
0 will
greatly slow performance. Use
0 only when
row order is required. Use
2 only when you
know row order is not important to the result.
Configure SPD Server
to send back data in row order whenever WHINIT performs an EVAL1 evaluation.