STARJOIN RESET Statement Options

Overview of STARJOIN Reset Statement Options

SPD Server uses RESET statements in SPD Server SQL to provide information about and to configure SPD Server STARJOIN settings.

RESET NOSTARJOIN=[0/1]

The NOSTARJOIN option suppresses the use of the SPD Server STARJOIN optimizer in the planning and running of SQL statements that have valid STARJOIN patterns or star schemas. When NOSTARJOIN is enabled, SPD Server ignores STARJOIN and uses pairwise joins to plan and run SQL statements. The default setting is NOSTARJOIN=0, which means that STARJOIN is enabled, and STARJOIN optimization occurs when SQL recognizes a valid SPD Server pattern or star schema.
Usage:
execute(reset nostarjoin=<1/0>)
  by sasspds ; 
NOSTARJOIN=0
enables the SPD Server STARJOIN facility
NOSTARJOIN=1
disables the SPD Server STARJOIN facility
Note: The statements NOSTARJOIN and NOSTARJOIN=1 are equivalent.

RESET STARMAGIC=nnn

STARMAGIC is the STARJOIN counterpart to the SQL MAGIC number option. You can use STARMAGIC options to manually adjust certain internal STARJOIN heuristics to improve certain join strategies.
The STARMAGIC option uses bit flags to configure the STARJOIN code. You can select different controls by adding the values for the bit flags below
Usage:
execute(reset starmagic=<1/2/4/8/16>)
  by sasspds ; 
STARMAGIC=1
forces all dimension tables to be classified as Phase I tables.
STARMAGIC=2
currently not used.
STARMAGIC=4
requires an exact match on the FACT composite index in order to meet Phase I conditions for STARJOIN.
STARMAGIC=8
disables the IN-SET STARJOIN strategy. The IN-SET strategy is enabled by default.
STARMAGIC=16
disables the COMPOSITE STARJOIN strategy. The COMPOSITE strategy is enabled by default.

RESET DETAILS="stj$"

The RESET DETAILS option prints details about your SPD Server STARJOIN facility settings. All internal STARJOIN debugging information is tied to the stj$ DETAILS key. You issue the stj$ reset option to display available information as SPD Server attempts to validate a join subtree. The RESET DETAILS="stj$" option is very useful for debugging STARJOIN and SQL statement execution.
Usage:
execute(reset details="stj$")
  by sasspds ;  

Example: STARJOIN RESET Statements

The following example connects to sasspds. Then the code issues the "stj$" RESET option to display all available information as SPD Server attempts to validate the join subtree for the SQL on a star schema. The STARMAGIC=16 setting disables the STARJOIN COMPOSITE join strategy (STARJOIN COMPOSITE joins are enabled by default in SPD Server). The NOSTARJOIN=0 setting means that STARJOIN is enabled (or resets a disabled STARJOIN facility) and ensures that STARJOIN optimization occurs if SPD Server SQL recognizes a valid SPD Server pattern or star schema. (The STARJOIN facility is enabled by default in SPD Server.)
After you submit the following SQL statements, the code disconnects from sasspds and quits:
    PROC SQL;
      connect to sasspds
        (dbq="star"
         server=sunburn.5007
         user='anonymous');

      execute (reset
         DETAILS="stj$"
         STARMAGIC=16
         NOSTARJOIN=0)

      by sasspds;

      execute (
         ...
         SQL statements
         ...);
      by sasspds;

      disconnect from sasspds;
    quit;