SET CURRENT QUERY ACCELERATION

The SET CURRENT QUERY ACCELERATION statement changes the value of the CURRENT QUERY ACCELERATION special register.

Invocation

This statement can be embedded in an application program or issued interactively. It is an executable statement that can be dynamically prepared.

Authorization

None required.

Syntax

Read syntax diagram
                                   .-=-.   
>>-SET CURRENT QUERY ACCELERATION--+---+------------------------>

>--+-NONE-----------------+------------------------------------><
   +-ENABLE---------------+   
   +-ENABLE WITH FAILBACK-+   
   +-ELIGIBLE-------------+   
   +-ALL------------------+   
   '-host-variable--------'   

Description

NONE
Specifies that no query acceleration is done.
ENABLE
Specifies that queries are accelerated only if DB2® determines that it is advantageous to do so. If an accelerator failure occurs while a query is running or if the accelerator returns an error, DB2 returns a negative SQLCODE to the application.
ENABLE WITH FAILBACK
Specifies that queries are accelerated only if DB2 determines that it is advantageous to do so. If the accelerator returns an error during the PREPARE or first OPEN for the query, DB2 executes the query without the accelerator. If the accelerator returns an error during a FETCH or a subsequent OPEN, DB2 returns the error to the user and does not execute the query.
Start of changeELIGIBLEEnd of change
Start of changeSpecifies that queries are accelerated if they are eligible for acceleration. DB2 does not use cost information to determine whether to accelerate the queries. Queries that are not eligible for acceleration are executed by DB2. If an accelerator failure occurs while a query is running or if the accelerator returns an error, DB2 returns a negative SQLCODE to the application.End of change
Start of changeALLEnd of change
Start of changeSpecifies that queries are accelerated if they are eligible for acceleration. DB2 does not use cost information to determine whether to accelerate the queries. Queries that are not eligible for acceleration are not executed by DB2, and an SQL error is returned. If an accelerator failure occurs while a query is running or if the accelerator returns an error, DB2 returns a negative SQLCODE to the application.End of change
host-variable
Start of changeA variable with a data type of CHAR or VARCHAR. The length must not exceed 255 bytes. Valid values are NONE, ENABLE, ENABLE WITH FAILBACK, ELIGIBLE, or ALL. If host-variable has an associated indicator variable, the value of that indicator variable must not indicate a null value. The value of host-variable must be left justified and must be padded on the right with blanks.End of change

Examples

The following statement sets the CURRENT QUERY ACCELERATION special register to NONE to indicate that no acceleration is done.
  SET CURRENT QUERY ACCELERATION NONE;