Chat now with support
Chat with Support

SQL Optimizer for SAP ASE 3.8 - 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

SQL Optimizer Functions

SQL Optimizer > SQL Optimizer Functions

Below is a list of available functions within the SQL Optimizer window.

SQL Editor Functions

These functions are available only in the SQL Editor.

Button or Menu Function

SQL Menu

image\B_Optimize.gif image\B_AbortOptimize.gif

Optimize/Abort Optimize

SQL Menu

image\B_OptimizeUsingAP.gif image\B_AbortOptimizeUsingAbstractPlan.gif

Optimize Using Abstract Plan/Abort Optimize Using Abstract Plan

SQL Menu

image\B_ShowPlan.gif

Show Plan

SQL Menu

Show Default Plan

File Menu

Open SQL from SQL Repository

SQL Editor and Optimized SQL Functions

These functions are available for both the SQL Editor and Optimized SQL.

Button or Menu Function

SQL Menu

image\B_RunResult.gif image\B_AbortRunResut.gif

Run Result/Abort Run Result

SQL Menu

image\B_RunForFirstRecord.gif image\B_AbortRunForFirstRecord.gif

Run for First Record/Abort Run for First Record

SQL Menu

image\B_RunForAllRecords.gif image\B_AbortRunForAllRecords.gif

Run for All Records/Abort Run for All Records

SQL & Right-click Menu

image\B_TestForScalability.gif

Testing for Scalability

SQL Menu

Open Optimized SQL

Edit Menu

image\B_CopytoIndexAdvisor.gif

Send to Index Advisor

Edit Menu

image\B_CopyToSQLWorksheet.gif

Copy to SQL Workshop

File Menu

Save to SQL Repository

Right-click Menu

Create Benchmark Factory Import File

Optimized SQL Functions

These functions are available only for the Optimized SQL.

Button or Menu Function

SQL Menu

image\B_BatchRun.gif image\B_AbortBatchRun.gif

Batch Run/Abort Batch Run

SQL Menu

image\B_AbstractPlanMatrix.gif

Abstract Plan Matrix

SQL Menu

image\B_SaveAbstractPlan.gif

Save Abstract Plan

SQL Menu

image\B_SQLComparer.gif

SQL Comparer

SQL Menu

Save Optimized SQL

SQL Menu

Find SQL. . . /Find Next SQL

Navigate Menu

image\B_FirstSQL.gif image\B_PreviousSQL.gif image\B_NextSQL.gif image\B_LastSQL.gif

First SQL/ Previous SQL/ Next SQL/ Last SQL

Navigate Menu

Go to SQL

Report Menu

Optimized SQL

View Menu

Show Optimization Details

View Menu

Show Batch Run Details

 

Related Topics

SQL Editor

SQL Optimizer Window

SQL Optimizer > SQL Editor > SQL Optimizer Window

The SQL Optimizer window allows you to enter a SQL statement for optimization. The optimization process analyzes the original SQL statement entered in the SQL Editor pane and uses the built-in Feedback-Searching engine to reproduce a list of new, semantically equivalent SQL statements.

The SQL Optimizer supports only a single SELECT, SELECT INTO, DELETE, UPDATE, or INSERT SQL statement. To optimize SQL within Transact SQL, use the SQL Scanner module to identify potential problematic SQL statements within the Transact SQL code. Then optimize each SQL statement in the SQL Optimizer module.

The SQL Editor pane of the SQL Optimizer window is where you input your original SQL statement so that you can optimize it.

SQL Text

The top left pane is used to enter and display SQL statements. The SQL Editor tab allows you to enter the SQL statement you want to optimize. When a SQL statement is copied to this pane from other modules, the optimization process automatically begins.

After optimization, multiply tabs are added to display the optimized SQL statements.

SQL Information

The top right pane [SQL Information] displays SQL information according to the button you select from the button bar at the top of this pane. These buttons include: query plan, abstract plan, and Information (SQL classification and warning messages), All Records, and First Record. The SQL Information Pane provides detailed information about the SQL statement.

Run Time Information

The Run Time information displays in three tabs in the bottom pane.

 

Related Topics

Enter Original SQL Statement

SQL Optimizer > SQL Editor > Enter Original SQL Statement

The SQL statement that you want to optimize is referred to as the original SQL statement.

To optimize a SQL statement

  1. Click image\B_SQLOptimizer.gif.

  2. Enter the SQL statement by typing it in, opening an existing file, or pasting it. Parameters within the SQL statement can be prefixed with a "@" sign or without.

To help construct a SQL statement use the member lookup, argument lookup, auto correction, indent, outdent , comment, and uncomment functions.

For SQL statements that involve temporary tables, you need to create the temporary table first before optimizing the SQL statement using the User-Defined Temp Table window.

Only one SQL Optimizer window can be opened at any time. The system will prompt you to save the original SQL statement if you attempt to open another file.

You can perform the following functions from the SQL Optimizer window:

Note: The SQL Optimizer supports only a single SELECT, SELECT INTO, DELETE, UPDATE and INSERT SQL statement. To optimize SQL within Transact SQL, use the SQL Scanner module to identify potential problematic SQL statements (e.g. database objects such as Procedures.)

 

Related Topics

Related Documents

The document was helpful.

Select Rating

I easily found the information I needed.

Select Rating