Chat now with support
Chat with Support

SQL Optimizer for DB2 LUW 4.3.1 - User Guide

SQL Optimizer for IBM® DB2® LUW
About SQL Optimizer for IBM DB2 LUW 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

About Scanned SQL Viewer

The Scanned SQL Viewer window enables the viewing and analysis of the SQL statement scanned. It displays the formatted scanned SQL statement, access plan, temp table (if applicable), and information about the SQL statement.

  • Formatted scanned SQL statement

  • Access plan

  • SQL Information

  • SQL statement type classification: Problematic, Complex, Simple, or Invalid.

  • Database error message if SQL is classified as Invalid,

  • Information about any SQL conversion the SQL Scanner applied to the SQL statement in order for it to generate a access plan

  • Line and column where the SQL statement was found in the source (for database object and source code files only)

  • SQL statement used to create and populate any temporary tables the SQL Scanner created

  • Checked SQL Information (if the SQL has been marked as checked)

  • Date time of when the SQL statement was checked

  • Name of who checked the SQL

  • Status

  • Checked description are displayed

 

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

 

Related Documents

The document was helpful.

Select Rating

I easily found the information I needed.

Select Rating