16.10.2015 Views

Getting Startedwith pureQuery

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

Chapter 6 – The Client Optimizer: <strong>pureQuery</strong> for Existing Applications 109<br />

<strong>pureQuery</strong>Xml file that <strong>pureQuery</strong>’s capture functionality creates is called a<br />

capture file.<br />

Capture<br />

<strong>pureQuery</strong> Properties:<br />

pdq.captureMode=ON<br />

Database<br />

JDBC<br />

Application<br />

Run<br />

SQL<br />

Statement<br />

<strong>pureQuery</strong><br />

Capture<br />

Execute<br />

Dynamic<br />

Statement<br />

Cache<br />

<strong>pureQuery</strong>Xml<br />

File<br />

Figure 6.2 - During capture, the Client Optimizer captures SQL statements<br />

that your application executes into a <strong>pureQuery</strong>Xml file.<br />

2. Configure: Process the <strong>pureQuery</strong>Xml file with the Configure utility. This simple<br />

procedure prepares the file so that the SQL statements in it can be bound in the<br />

database, and so that <strong>pureQuery</strong> can reference the statements in the file during<br />

the execution of the application. If you are using IBM Optim Development Studio,<br />

the tooling runs the Configure utility automatically. Figure 6.3 shows the Configure<br />

utility configuring a <strong>pureQuery</strong>Xml file.<br />

Configure<br />

<strong>pureQuery</strong>Xml<br />

File<br />

<strong>pureQuery</strong><br />

Configure<br />

Utility<br />

Configure<br />

Configured<br />

<strong>pureQuery</strong>Xml<br />

File<br />

Figure 6.3 - The Configure utility prepares a <strong>pureQuery</strong>Xml file for use in<br />

binding and execution.<br />

3. Bind: If you intend to use static SQL, use the StaticBinder utility to bind the SQL<br />

statements that are in the <strong>pureQuery</strong>Xml file into packages in the database. If you<br />

do not intend to use static SQL, you can skip this step. Figure 6.4 shows the<br />

StaticBinder utility binding packages of SQL statements in the database.

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!