지금 지원 담당자와 채팅
지원 담당자와 채팅

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

Generate Report for Scanned SQL

SQL Scanner > Generate Report for Scanned SQL

You can generate a report with the SQL statements in the SQL Scanner window. The contents of the report depend on the components you select.

  1. Select Report | Scanned SQL to open the Scanned SQL Report Criteria window.

  2. Select the components for the report.

  3. Select All SQL or Select SQL and enter the specific SQL statement numbers.

  4. Click OK to generate the report. The information in the report can be saved and printed.

Note: A few minutes may be needed to generate a long report.

 

Related Topic

Save Abstract Plan

SQL Scanner > Save Abstract Plan

To save the abstract plan from the SQL Scanner to the database

  1. Click image\B_SaveAbstractPlan.gif.

  2. In the Save to group drop-down field, select the group where you want to store your abstract plan.

  3. Click Save.

When the Abstract Plan is saved, it is only saved for the user that you are logged on as. In order for another user to use this abstract plan, you must export/import the plan to another user.

At the prompt "Plan has been created successfully. The id is nnnnnnnnnn". Click OK. The abstract plan is saved in Adaptive Server.

Notes:

  • Adaptive Server saves the abstract plan in the sysqueryplans system table. When a query is executed, Adaptive Server looks in the sysqueryplans table for a stored SQL text that matches the query. If a match is found, the saved abstract plan is used to execute the query.

    Saving the abstract plan onto the database means that when the same SQL statement is executed, the query plan is based on the abstract plan.

  • When saving the abstract plan, Adaptive Server automatically trims the white-spaces from the SQL text replacing it with one space. You need to make sure the SQL statement you execute in your application is the same as the original SQL text that you saved with the abstract plan. If the SQL text does not match, then the abstract plan will not be used.

Here are some examples you need to be aware of:

Spaces in between functions

where substring ( EMP_NAME, 1, 5 ) = 'SMITH'

This is not the same as

where substring(EMP_NAME,1,5) = 'SMITH'

Spaces in between database, scheme and object name

from sqlexp . sqlexp . EMPLOYEE

This is not the same as

from sqlexp.sqlexp.EMPLOYEE

Parameter replacement

where EMP_ID = @var_a

This is not the same as

if @var_a = 56

where EMP_ID = 56

Comments

where EMP_ID =123 /* comment */

This is not the same as

where EMP_ID = 123

 

Related Topics

Create Benchmark Factory Import File

SQL Repository > Create Benchmark Factory Import File

All the SQL statements can be saved in a text file from the SQL Scanner, the SQL Repository, the SQL Inspector, and the SQL Optimizer windows. These SQL statements can then be imported into Benchmark Factory 4.6 or later.

To create a file to import into Benchmark Factory

  1. Right-click and select Create Benchmark Factory Import File.

  2. Select the specific SQL statements that you want to save.

  3. Enter the filename and select the file location.

 

SQL Scanner Functions

SQL Scanner > SQL Scanner Functions

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

Button or Menu Function

Group & Right-click Menu

image\B_AddJobs.gif

Add Jobs

Group & Right-click Menu

Delete Marked Jobs

Group Menu

Mark All

Group Menu

Unmark All

Group Menu

Copy to Other Group

Group Menu

Move to Other Group

Group Menu

image\B_GroupManager.gif

Group Manager

Job Menu

image\B_Scan.gif image\B_AbortScan.gif

Scan/Abort Scan

Job Menu

Find Job

Job Menu

Checked List

SQL & Right-click Menu

Open in SQL Inspector

SQL & Right-click Menu

Open in SQL Collector

SQL & Right-click Menu

Checked List

SQL Menu

image\B_SaveAbstractPlan.gif

Save Abstract Plan

SQL Menu

Find SQL

SQL Menu

Find Next SQL

Report Menu

Scanned SQL Report

Report Menu

Group Summary

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

View Menu

All SQL

View Menu

Simple SQL

View Menu

Complex SQL

View Menu

Problematic SQL

View Menu

Invalid SQL

View Menu

Checked SQL

View Menu

Unchecked SQL

Edit Menu

image\B_SendToSQLOptimizer.gif

Send to SQL Optimizer

Edit Menu

image\B_CopytoIndexAdvisor.gif

Send to Index Advisor

Edit Menu

image\B_CopyToSQLWorksheet.gif

Copy to SQL Worksheet

File Menu

Save SQL to SQL Repository

Right-click Menu

Add/Remove Bookmark

Right-click Menu

Modify

Right-click Menu

Use Database

Right-click Menu

Set User

Right-click Menu

View (Large Icons/ Small Icons/ List/ Details)

Right-click Menu

Mark Selected Jobs

Right-click Menu

Unmark Selected Jobs

Right-click Menu

Properties

Right-click Menu

Save

Right-click Menu

Create Benchmark Factory Import File

 

Related Topics

SQL Scanner Window

관련 문서

The document was helpful.

평가 결과 선택

I easily found the information I needed.

평가 결과 선택