Chat now with support
Chat with Support

SQL Optimizer for SAP ASE 3.9 - User Guide

Introduction Tutorials Preferences Editor Functions SQL Information and Functions Performance Monitor SQL Inspector SQL Collector for Monitor Server SQL Scanner Index Advisor SQL Optimizer
SQL Optimizer Overview Optimization Engine Common Coding Errors in SQL Statements What Function Should l Use to Retrieve the Run Time? Unsatisfactory Performance Results SQL Optimizer Functions SQL Editor Optimized SQL Activity Log
SQL Worksheet SQL Formatter Database Explorer Code Finder Object Extractor SQL Repository Index Impact Analyzer Index Usage Analyzer Configuration Analyzer Migration Analyzer Abstract Plan Manager User-Defined Temp Tables SQL History Legal Information

Query Plan

Query Plan Overview

SQL Information and Functions > Query Plan > Query Plan Overview

The query plan is the steps the Adaptive Server optimizer follows as it executes a SQL statement. Each line represents how the Adaptive Server optimizer will physically retrieve rows of data from the database or how the data is prepared. The Adaptive Server optimizer performs the child step before the parent step. Depending on the SQL statement, the parent step may be executed when a single row has been returned from the child step. Some query plans may require all rows to be returned from the child step before executing the parent step.

By examining the query plan, you can see exactly how the database executes your SQL statement, helping you judge whether the SQL statement is the most efficient.

You can use the Query Plan page of the SQL Information pane to view the steps Adaptive Server follows to execute the SQL statement. You can animate the plan to show you the progression of the plan steps. You can look up the explanation of the query plan operations.

 

Related Topics

Review Query Plans

SQL Information and Functions > Query Plan > Review Query Plans

The query plan can be displayed in different ways to help you get a clear picture of or detailed information about the steps that Adaptive Server is taking to execute the SQL statement.

Note: These different display modes are only available when you are connected to Adaptive Server 15.0 or later.

To change how the query plan displays

  1. Right-click the Query Plan window and select View Plan.

  2. Select one of the following display options.

  • As Tree Plan
  • As Plain Language Plan
  • As Graphic Plan
  • As MS Graphic Plan
  • As Text
  • As XML

When you are viewing the query plan as Tree Plan or as Plain Language Plan, the following functions are available from the button pane at the right edge of the query plan.

Button Action Description

image\B_GoToFirstStep.gif

Go to First Step

Highlights the first execution step.

image\B_GoToPreviousStep.gif

Go to Previous Step

Highlights the previous execution step.

image\B_GoToNextStep.gif

Go to Next Step

Highlights the next execution step.

image\B_ShowPlanDetail.gif

Show Plan Detail

Displays the Plan Detail window. The information displayed is dependent on the highlighted row.

 

Related Topics

Query Plan Options

SQL Information and Functions > Query Plan > Query Plan Options

The display of the Query Plan page can be customized for each module in which it is included. You can select which elements of the execution plan you would like displayed in the text of the query plan. You can also have the element displayed in a separate column.

To customize the Query Plan page

  1. Right-click the query plan and select Plan Options.

  2. In the Visible column, select the elements you want displayed in the execution plan text.

  3. In the As Column column, select the elements for which you want a column added to the display in the Query Plan page.

  4. Click OK.

 

Related Topics

Related Documents

The document was helpful.

Select Rating

I easily found the information I needed.

Select Rating