Recommendations for maintaining an application that is enabled with client optimization

Periodically, you will update applications that are enabled with pureQuery client optimization with newly captured pureQuery data. If you are executing SQL statements statically, you will need to bind packages of the newly captured SQL statements.

Recommendations for update applications that are enabled with pureQuery client optimization and binding newly captured pureQuery statements include:

Limit the number of packages in the database
When you use pureQuery client optimization to enable an application to run statically, you will periodically create new packages in the database. Sometimes, new packages will replace older packages, but often new packages will be added without replacing other packages. Adding new packages to other packages is common if you use package versioning. Keep track of the packages that you created in the database and remove old packages periodically so that your DB2 database does not contain a large number of packages.
Using package versioning
You can use package versioning to create a new version of a package, without replacing the previous version of a package. If you use package versioning, you can fall back to a previous version of a package if you discover problems the newer version.

Package versioning is particularly useful if you are providing the input pureQueryXML in a repository, and you are updating the repository with new pureQueryXML without stopping the application. If you update the repository without stopping the application while you are using static SQL, you will need to bind the packages described by the new pureQueryXML before you upload the new pureQueryXML to the repository. The new pureQueryXML might contain packages with the same names as packages that are already bound in the database. If the package names are the same, problems might occur if the packages in the database are replaced while pureQuery Runtime is attempting to use them. If you use package versioning, the existing packages will not be replaced; new packages will be added. pureQuery Runtime can use the new packages when you activate the runtime group version that contains the new pureQueryXML in the repository.

When you run SQL statically and use package versions, develop a process to preserve the pureQueryXML file that was used to create the package on the database. To execute SQL statically by using a specific database package version, the application must use the pureQueryXML that was used to create the package version. Also, be careful to keep track of the packages that you created and periodically remove old packages from the database.

Removing old SQL statements from a pureQueryXML file

If you capture only the new or updated SQL statements, use the -removeSQLInactiveForDays option with the Configure utility to remove inactive SQL statements. Use the -cleanConfigure option with the Configure utility to avoid gaps in section numbers when creating packages from SQL statements in a pureQueryXML file.

If the application changes significantly, perform a capture of all SQL statements that are used by the application instead of capturing just the updated or new SQL statements. If you capture only the new or updated SQL statements, the pureQueryXML file might contain SQL statements that are no longer used by the application.

Note: If you use the -cleanConfigure option with the value set to TRUE, the Configure utility does not preserve the statement set information, including consistency token information.

Feedback