立即与支持人员聊天
与支持团队交流

SQL Optimizer for DB2 LUW 5.0 - User Guide

SQL Optimizer for IBM® DB2® LUW
UsageStatistics Getting Started Options SQL Scanner SQL Optimizer SQL Formatter SQL Inspector Database Explorer SQL Repository Index Impact Analyzer Index Usage Analyzer User-Defined Temp Table Editor Functions SQL Functions SQL Information and Functions Activity Log
Tutorials About us Copyright

Scanned SQL Viewer Window

ClosedView the Scanned SQL Viewer

The Scanned SQL Viewer window is divided into these sections:

Job list

The Job list at the top of the Scanned SQL Viewer window displays the Job description of the selected Job and contains the list of Jobs that satisfy the view criteria.

Scanned SQL (Top Pane)

The top pane of the Scanned SQL Viewer window displays the scanned SQL statement for a particular scan Job. If the SQL statement is valid, the scanned SQL statement will be laid out according to the indentation algorithm. Otherwise, the scanned SQL statement will be unformatted.

If more than one SQL statement is found in a Job, multiple tabs for selecting the SQL are displayed at the bottom right corner of the window.

SQL Information (Bottom Pane)

The SQL Information pane has buttons at the top of it to select whether to display the access plan graph, access plan tree, DB2 Optimized Text, Information (the classification of the SQL, the location in the file or database object and login information), the scanner temp table DDL, and the checked SQL details. If the button is enabled, there is information on that page. If the button icon is grayed, then no information is available for that SQL statement.

 

Understand the Access Plan

If the scanned SQL statement is valid, the access plan for the SQL statement will be retrieved. The access plan is a combination of steps the DB2 LUW optimizer selects to execute the SQL statement. It is a sequential set of steps required to carry out the query, complete with the access methods chosen for each table.

Examination of the access plan shows how the database executes the SQL statement and aids in the analysis of whether the SQL statement is the most efficient.

The access plan help provides online help for each operation within the access plan to help you understand each step of the plan.

To view the help for an operation

Right-click the access plan step for which you want help and select Get help on operation_name.

 

Open Scanned SQL Viewer

Once the Job has been scanned and the SQL statements found, view the SQL statements through the Scanned SQL Viewer.

To open the Scanned SQL Viewer window

  • Click image\B_ScannedSQLViewer.gif

    or

  • Double-click the Job

 

View a Particular Type of SQL Statement

When the Scanned SQL Viewer window is first opened all SQL statements in the selected Job are shown. Customization of the view allows the displaying of: All, Simple, Problematic, Complex, and/or Invalid SQL statements. In addition, you can view the Checked and/or Unchecked SQL statements. The title bar of the Scanned SQL Viewer window displays the chosen criteria. One or more types of SQL statements can be viewed by selecting or de-selecting the menu items. The Job list contains all the Jobs using the chosen view criteria:

To display all SQL statements

Select View | All SQL.

To display the Simple SQL statements

Select View | Simple SQL.

To display the Problematic SQL statements

Select View | Problematic SQL.

To display the Complex SQL statements

Select View | Complex SQL.

To display the invalid SQL statements

Select View | Invalid SQL.

 

To display SQL statements with different bound and new access plan that satisfy the selected SQL classification type

Select View | Different Bound and New Access Plan.

To display SQL statements with no bound access plan that satisfy the selected SQL classification type

Select View | No Bound Access Plan.

 

To displays all Checked SQL statements

Select View | Checked SQL.

To displays all Unchecked SQL statements

Select View | Unchecked SQL.

 

相关文档

The document was helpful.

选择评级

I easily found the information I needed.

选择评级