Overview of pureQuery client optimization

With pureQuery™ client optimization, you can control the execution of application SQL statements without changing the application source code. You control the execution of SQL statements by configuring SQL statements that you capture from the application and by setting pureQuery runtime properties.

With pureQuery client optimization, you can take advantage of pureQuery Runtime features to improve performance. For example, you can run SQL statement statically, and you can substitute poorly performing statements with more efficient statements.

The pureQuery client optimization process

The following four steps enable a data access application with pureQuery client optimization.
  1. Capture SQL statements and related data from the application in one or more pureQueryXML files.
  2. Configure the pureQueryXML file. If necessary, merge files into a single configured pureQueryXML file.
  3. Perform a BIND operation on the SQL statements in the configured pureQueryXML file so that the SQL statements can run statically.
  4. Execute the SQL statements statically.

The steps enable the application to execute SQL statements statically on a DB2® database. Static execution can improve application performance and security. The steps that bind and execute SQL statements statically are optional. pureQuery Runtime can control the execution of SQL statements when the statements are run dynamically. You set pureQuery Runtime properties to control the execution of the application SQL statements.

The following illustration shows the pureQuery client optimization process and the related components:

Figure 1. The pureQuery client optimization process and components
pureQuery client optimization process and components

For Java™ applications, pureQuery client optimization requires the Java libraries. The pureQuery Runtime libraries work with the Java database driver to control the execution of application SQL statements.

For .NET and DB2 ODBC/CLI applications, pureQuery client optimization requires IBM® Data Server database drivers. pureQuery capabilities to control the execution of application SQL statement are incorporated into the database drivers

The Java based pureQuery utilities Configure and StaticBinder are used configure the pureQueryXML file and perform the bind operation. You can also use IBM Data Studio to manage the pureQuery client optimization process.

In the previous illustration, the SQL information is captured in a pureQueryXML file. You can set up pureQuery Runtime to store the captured SQL information in a repository that is created in a database. pureQuery Runtime can also retrieve data such as runtime properties from the repository.

The pureQuery client optimization application environment and SQL Management repositories

You can set pureQuery Runtime properties to store the captured SQL information in a repository that is created in a database. You can also store pureQuery Runtime properties and data from other files that are used by pureQuery Runtime in a repository.

For example, you can create configuration files that specify options for the pureQuery configure or bind process. You can store the configure and bind process configuration files with the pureQuery data in the repository with the pureQueryXML and pureQuery Runtime configuration data. If you need to update the pureQueryXML data, you can retrieve the data and the configuration files for the configure and bind processes from a single location.

The following illustration shows a typical environment with an application that is enabled with pureQuery client optimization application. In the illustration, a repository contains the pureQuery runtime properties information and the configured pureQueryXML file information that pureQuery Runtime uses to control SQL statement execution. In the illustration, a bind operation is performed on the SQL statements in the configured pureQueryXML file and the statements are run statically.

Figure 2. pureQuery client optimization application environment
pureQuery client optimization application environment with optional processes to update the pureQuery information

The Java based pureQuery utility ManageRepository is used to create and manage repositories.

In a repository, you store pureQueryXML data, SQL data that are captured by pureQuery Runtime, and pureQuery Runtime configuration information. While the application is running, updates can be made in the application environment. The configure and bind tasks are used when updates are made in the application environment.

The dotted lines in the previous illustration show optional processes that can be performed in the application environment to update the pureQuery information. You can set up pureQuery Runtime to capture SQL statements and associated information. pureQuery Runtime captures statements that were not captured earlier in the application environment or in a development or test cycle.

To update the application environment, you download the captured SQL information and the pureQueryXML data into files and merge the files from the repository into a single file with the Merge utility. Then you configure the updated file, perform a bind operation on the statements in the file, and upload the updated pureQueryXML file data and other files, as needed, to the repository. Data Studio can help you manage repositories and can help you update the pureQuery client optimization application environment.


Feedback