Correlated Query Options

SPD Server has the following 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, which includes debugging and tracing information. The debugging and tracing output is generated when the SPD Server query rewrite facility detects subexpressions. The query rewrite facility then rewrites and executes the SQL code. The SQL code produces the intermediate results and the final rewritten SQL statement. By default, the SPD Server _QRW option for diagnostic output is not enabled.
The _QRW=1 / _QRW=0 option and the NO_QRW=0 / NO_QRW=1 option do the same thing as the _QRW / NO_QRW 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. Typically, you do not specify this option unless you want to test whether an SQL statement runs faster without rewrite optimization, or if you suspect that the resulting rowset that you get from a query rewrite evaluation is incorrect.
The _QRWENABLE=1 / _QRWENABLE=0 option does the same thing as the _QRWENABLE / NO_QRWENABLE 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 ;