To work with the SQL Outline view:
The view consists of three pages, which are shown at the bottom of the screen.
The Database page of the SQL Outline view groups SQL statements under database objects that themselves are grouped under database schemas. Notice that each statement is expandable.
The hierarchy in this Database view is:
Database schema
Table
SQL statement
Java project
Method that runs the SQL statement
Columns in the SQL statement
Java project
Java package
Interface
Method
SQL statement
Database schema
Table
Column
The correct file opens in the Inventory_levelsData tab, and pureQuery places the cursor on the line that contains the SELECT statement.
The SQL Outline view provides a filter that you can use to see only the statements that you want to see.
Although your user ID is the default schema for your Java project, the SQL Outline view shows SQL statements in all Java projects that the Package Explorer lists. So, you must specify the schema in the filter.
When you click OK, the SQL Outline view should show only four SELECT statements per the criteria that you specified.
Option | Description |
---|---|
Find in Source | This option opens for editing the Java file in which the statement appears. The cursor is positioned at the beginning of the line at which the statement is located. |
Run SQL | This option runs the statement and shows the result in the SQL Results view. |
Show in SQL Editor | This option opens the statement for editing in the SQL Editor. |
Export SQL to File | This option saves the statement in a file. |
Compare | If you select two statements, this option opens them in the Compare editor, where you can see how they differ from each other. |
Retrieve EXPLAIN Data | This option runs the EXPLAIN utility. EXPLAIN is a monitoring tool in Visual Explain that produces information about the estimated cost of executing an SQL SELECT, INSERT, UPDATE, or DELETE statement. |
Open Visual Explain | This option opens the Collect Explain Data wizard to collect information that Visual Explain requires to show a diagram of the access plan for the statement. After you complete the Collect Explain Data wizard, the Access Plan Diagram view opens to show a diagram of the access plan for the statement. For more information about Visual Explain, see Diagramming access plans with Visual Explain. |
Get Query Tuner Report | Generates recommendations for tuning the statement, if Optim™Query Tuner is installed on your system. |
Open Query Tuner | Opens the statement in Optim Query Tuner, if Optim Query Tuner is installed on your system. |
Generate pureQuery Code | For SELECT statements, this option generates
an interface that contains a method that runs the statement. This
option also generates an implementation of the interface. You can
choose whether to generate a bean that can hold query results or to
use an existing bean. For DELETE, INSERT, and UPDATE statements, this option generates an interface that contains a method that runs the statement and an implementation of that interface. |
Find in pureQueryXML | You can use this option with pureQuery's client optimization, which this tutorial does not cover. |
Filter | Opens the Filter window, which you can use to show only the SQL statements that you want to see. |
Show SQL in Table or Show SQL in Tree | Toggles the display of the SQL statements in a table or in a tree. |
Show Data | This option shows performance data or EXPLAIN data for the statement. In the next lesson, you will learn how to use the SQL Outline view to gather data about the performance of the SQL statements in your project. |