In Adaptive Server releases earlier than 15.0.2, the set parameters took effect after the stored procedure was executed or recompiled. Adaptive Server release 15.0.2 and later allows you to use optimizer set parameters at compile time to affect the optimizer in stored procedures or batches.
This changed behavior may effect the composition of the result set. Sybase recommends that you review the result set created by the 15.0.2 versions of the set parameters before using them in your production systems.
You must reset the set parameter before returning from the stored procedure or the execution of subsequent stored procedures may be affected. If you intend to propogate this change to subsequent stored procedures, use export_options parameter.
Adaptive Server changes the compile-time behavior for these parameters:
distinc_sorted
distinct_sorting
distinct_hashing
group_sorted
group_hashing
bushy_space_search
parallel_query
order_sorting
nl_join
merge_join
hash_join
append_union_all
merge_union_all
merge_union_distinct
hash_union_distinct
store_index
index_intersection
index_union
multi_table_store_ind
opportunistic_distict_view
advanced_aggregation
replicated_partition
group_inserting
basic_optimization
auto_query_tuning
query_tuning_mem_limit
query_tuning_time_limit
set plan optgoal