COST, the default setting
for SPDEWHEVAL=, analyzes the WHERE expression and any available indexes.
Based on the analysis, the SPD Engine chooses an evaluation strategy
to optimize the WHERE expression. The evaluation strategy can be EVAL1,
EVAL3, EVAL4, or a strategy that sequentially reads the data if no
indexes are available, or if the analysis shows that using the index
or indexes cannot improve processing time.
COST optimizes the number
of threads to use for processing the WHERE expression. COST determines
and spawns the number of threads that can be efficiently used. Based
on the value of THREADNUM=, COST can save significant processing time
by not spawning threads that are underutilized.
COST is the recommended
value for SPDEWHEVAL=, unless the WHERE expression exactly meets one
of the other evaluation strategy criterion. It is strongly recommended
that benchmark tests be used to determine whether a value other than
COST is more efficient.
EVAL1 might be more
efficient if the WHERE expression is complex and there are multiple
indexes for the variables. EVAL1 spawns multiple threads to determine
which segments meet the conditions of the WHERE expression. Multiple
threads can also be used to retrieve the observations.
Note: In a few situations, COST
might not perform the best. To determine whether changing the value
to EVAL1 or EVAL3EVAL4 can produce better performance, run a performance
benchmark, change the value, and re-run the performance benchmark.
Comparing results shows you how the specific data population you are
querying responds to rules-based WHERE planning.