Correlated Query Options

The following are SPD Server SQL options for use with correlated query rewrites:

_QRW/NO_QRW

Use the _QRW/NO_QRW option to configure SPD Server to enable or disable the query rewrite facility diagnostic output. Specifying this SPD Server RESET option enables or disables various debugging and tracing outputs from the query rewrite facility. The debugging and tracing outputs are generated when the SPD Server query rewrite facility detects sub-expressions that it rewrites and executes the SQL code. The SQL code produces the intermediate results and final rewritten SQL statement. By default, the SPD Server _QRW option for diagnostic output is not enabled.
SPD Server provides alternate expressions that do the same thing as the _QRW/NO_QRW option. They are the _QRW=1/_QRW=0 option and the NO_QRW=0/NO_QRW=1 option.
Usage:
/* Enable query rewrite diagnostics */
execute(reset _qrw)
 by sasspds ;

/* A second way to enable    */
/* query rewrite diagnostics */
execute(reset _qrw=1)
  by sasspds ;

/* A third way to enable     */
/* query rewrite diagnostics */
execute(reset no_qrw=0)
 by sasspds ;

/* Disable query rewrite diagnostics */
execute(reset no_qrw)
  by sasspds ;

/* A second way to disable query */
/* rewrite diagnostics           */
execute(reset _qrw=0)
 by sasspds ;

/* Another way to disable query */
/* rewrite diagnostics          */
execute(reset no_qrw=1)
  by sasspds ;

_QRWENABLE/NO_QRWENABLE

Use the _QRWENABLE/NO_QRWENABLE option to completely disable the SPD Server query rewrite facility. Disabling the query rewrite facility prevents the rewrite planner from intervening in the SQL flow and from making any optimizing rewrites. This option is not normally specified unless you want to test if an SQL statement would run faster without rewrite optimization, or if you suspect that the resulting row set that you get from a query rewrite evaluation is incorrect.
SPD Server provides an alternate expression that does the same thing as the _QRWENABLE/NO_QRWENABLE option. It is the _QRWENABLE=1/_QRWENABLE=0 option. The query rewrite facility is enabled in SPD Server by default.
Usage:
/* Disable query rewrite */
/* facility              */
execute(reset no_qrwenable)
 by sasspds ;

/* A second way to disable */
/* query rewrite facility  */
execute(reset _qrwenable=0)
  by sasspds ;

/* Enable query rewrite  */
/* facility              */
execute(reset _qrwenable)
  by sasspds ;

/* A second way to enable  */
/* query rewrite facility  */
execute(reset _qrwenable=1)
  by sasspds ;