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.

76<br />

<strong>Getting</strong> Started with <strong>pureQuery</strong><br />

The <strong>pureQuery</strong> Analysis view gives developers the ability to drill down into the SQL<br />

execution for “where used” analysis.<br />

4.2 SQL Outline view<br />

If your <strong>pureQuery</strong> enabled project contains the source code, you can gain insight and view<br />

the statements on the SQL Outline that your application issues without having to execute<br />

your application in capture mode—refer to Chapter 10 for more information on capturing<br />

SQL statements. This is true for JPA, Hibernate, JDBC or any application that use the<br />

<strong>pureQuery</strong> API. You may not see all of the SQL statements within your applications if you<br />

have coded your statements based on variables and then passed those variables to the<br />

JDBC methods, for example. In such cases, you may see the SQL Outline showing an<br />

expression and not the actual SQL statement. You can get detailed help of the SQL Outline<br />

at any time by selecting it and pressing F1 which will launch the build-in Help in ODS.<br />

Figure 4.2 - SQL Outline view Java tab<br />

4.2.1 Gather the SQL statements issued by the application<br />

If your application is written using the <strong>pureQuery</strong> API, then the outline view will<br />

automatically show all your SQL statements. However if your applications is coded directly<br />

in JDBC and not in the <strong>pureQuery</strong> API, if you want to view all SQL statements issued by<br />

your application to the database, then you will have to run your application using the Client<br />

Optimizer feature from the <strong>pureQuery</strong> runtime. To leverage this feature, you must Enable<br />

SQL capturing and binding for JDBC applications when either adding <strong>pureQuery</strong> support to<br />

your project or from the project’s properties page as shown in Figure 4.3.

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

Saved successfully!

Ooh no, something went wrong!