The steps to enable pureQuery client optimization are common to a stand-alone application or an application server-based application. Optim™ Development Studio helps with the pureQuery client optimization process but is not required. You set pureQuery Runtime properties and use the pureQuery command line utilities to perform the required steps.
For an application, the client optimization process can be performed multiple times, and each step in the process can be performed multiple times. For example, you can perform the capture step multiple times to incrementally capture SQL statements that are executed by the application. You can merge the captured SQL data and perform the configure and bind after you have completed capturing the SQL data. You can perform the configure, bind and execute steps each time you capture SQL data.
Execute the JDBC application in a mode where information is captured regarding the SQL statements while they are executed in the application. The collected information includes information that is needed to bind the application's SQL statements. Information such as the SQL string, parameter metadata, result set metadata, and stack traces are captured in a pureQueryXML file. You can capture SQL data during the test or development phase.
You can create multiple files that contain captured SQL data. You can perform the capture step multiple times during the client optimization process, or you can perform the client optimization process multiple times. You can also create pureQueryXML files SQL data with the pureQuery GeneratePureQueryXml utility. You then must merge multiple files that contain captured SQL data with the pureQuery Merge utility before you use the pureQuery Configure utility in the next step.
You prepare the captured SQL statements for the bind step. This step is required only if you are executing SQL statements statically with pureQuery client optimization. In this step, you organize and group SQL statements into statement sets. The statement sets will be used to create DB2 packages in the bind step. You also assign package information to the statement sets. Package infomation includes information such as package name, collection ID, and consistency token. You use the pureQuery Configure utility to prepare a pureQueryXML file for the bind step.
Perform the bind to the target database server where the SQL statements execute. The pureQuery StaticBinder utility performs a remote bind by using the services of the IBM® Data Server Driver for JDBC and SQLJ. The StaticBinder utility deploys SQL statements by creating packages that contain the SQL statements on the database and binding the packages to the database. The StaticBinder utility is based on the DRDA® protocol and can also generate DBRM files for DB2 for z/OS®, which can be used for local bind with the DSN BIND command. Bind is a deployment activity. This step is required only when executing SQL statements statically with pureQuery client optimization.
This step is required only if you are executing SQL statements statically with pureQuery client optimization. Run the JDBC application in a mode where the SQL statements that are issued by the application are executed statically. pureQuery Runtime determines when to execute an SQL statement statically by comparing the SQL statement and SQL information such as SQL string, cursor, and prepare attributes such as the result set type, concurrency, holdability. This step is required only when executing SQL statements statically with pureQuery client optimization.
During the development and testing process, developers can produce many changes to an application and can provide incremental releases to test or production. pureQuery client optimization can be done incrementally or at the final system test stage when all the modules are tested in an integrated fashion. The developers can continue to develop SQL statements that execute dynamically and that are not affected by the transition to static SQL execution.