AllowDeferredPrepare IBM data server driver configuration keyword

Minimizes network flow by combining the PREPARE request with the corresponding execute request.

Equivalent CLI keyword
DeferredPrepare
Equivalent IBM® Data Server Provider for .NET connection string keyword
N/A
db2dsdriver.cfg configuration syntax
<parameter name="AllowDeferredPrepare" value="0 | 1"/>
Default setting:
The prepare request is delayed until the execute request is sent.
Equivalent statement attribute:
SQL_ATTR_DEFERRED_PREPARE
Usage notes:

Defers sending the PREPARE request until the corresponding execute request is issued. The two requests are then combined into one command/reply flow (instead of two) to minimize network flow and to improve performance.

  • 0 = SQL_DEFERRED_PREPARE_OFF. The PREPARE request will be executed the moment it is issued.
  • 1 = SQL_DEFERRED_PREPARE_ON (default). Defer the execution of the PREPARE request until the corresponding execute request is issued.

    If the target DBMS does not support deferred prepare, the client disables deferred prepare for that connection.

Note: When deferred prepare is enabled, the row and cost estimates normally returned in the SQLERRD(3) and SQLERRD(4) of the SQLCA of a PREPARE statement may become zeros. This may be of concern to users who want to use these values to decide whether or not to continue the SQL statement.