enableDynamicSQLReplacement property

Specifies whether to run alternative SQL statements that were added to a pureQueryXML file and both the original statements and the alternative statements were not bound.

After you capture SQL statements in a pureQueryXML file, you might discover that one or more statements do not perform as well as your application requires. However, because you discover this fact late in your development cycle, modifying the application might not be possible. You can edit the pureQueryXML file by adding an alternative SQL statement for each SQL statement that is underperforming. When you run your application, pureQuery uses the alternative SQL statements, instead of the SQL statements that you originally captured.

You can choose whether to bind the alternative SQL statements after you add them. If you do not bind them but want to use them, you must set the enableDynamicSQLReplacement property to TRUE when you run your application.

This property can take these values:

TRUE
Specifies to run the alternative SQL statements. pureQuery runs them dynamically because they are not bound.
FALSE
Specifies not to run the alternative SQL statements. Instead, pureQuery runs the original SQL statements that are in the pureQueryXML files that your application uses.
This is the default value.
The following list describes whether pureQuery Runtime runs an alternative SQL statement:
  • If the value of executionMode is DYNAMIC, the SQL statement that is run depends on the value of the enableDynamicSQLReplacement property.
  • If the value of executionMode is STATIC:
    • If the alternative statement is not bound, it is run only when both the value of the enableDynamicSQLReplacement option is TRUE and the value of the isBindable attribute is FALSE for the original statement.
    • If the alternative SQL statement is bound, the alternative statement is run statically. The enableDynamicSQLReplacement property is ignored.

      To bind the alternative statement, add the alternative statement and then perform the bind operation. If the original statement is marked as bindable, the alternative statement is bound.

DB2 CLI and IBM Data Server Driver usage notes

When using DB2® Call Level Interface (CLI) or the IBM® Data Server Driver with pureQuery Runtime, you can use the pureQuery Runtime property as a configuration keyword.

IBM CLI keyword syntax
enableDynamicSQLReplacement = TRUE | FALSE
IBM Data Server Driver configuration syntax
<parameter name="enableDynamicSQLReplacement" value="TRUE | FALSE" />
Equivalent IBM Data Server Provider for .NET connection string keyword
N/A

Feedback