S
QR Bits

           Force your SQR to run using the Rule-Based Optimizer


Some SQR processes run more efficiently and perform better if they use the RULE based optimizer.  However, your Database might be set to use the cost-based optimizer.  

The following code bit can be placed in an SQC and called from your SQR.  This will force the SQR transaction to use the RULE based optimizer. 

! --------------------
! - BEGIN CODE BIT
! --------------------

begin-procedure force-rule-based
BEGIN-SQL
ALTER SESSION SET OPTIMIZER_GOAL = RULE
END-SQL
end-procedure force-rule-based

! --------------------
! - END CODE BIT
! --------------------