Chat now with support
Chat with Support

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

Editor Panes Shortcuts

The following list is the quick reference to some common shortcut keys provided to quickly accomplish tasks that are performed frequently within the Editor panes.

Function

Shortcut Keys

Delete next word

CTRL+DELETE

Delete previous word

CTRL+BACKSPACE

Delete next character

DELETE

Delete previous character

BACKSPACE

Delete current line

CTRL+Y

Highlight a word

SHIFT+CTRL+LEFT or RIGHT ARROW

Highlight a character

SHIFT+LEFT or RIGHT ARROW

Cursor forward a word

CTRL+RIGHT ARROW

Cursor backward a word

CTRL+LEFT ARROW

Insert mode

INSERT

Bring up Member Lookup

CTRL+SPACEBAR

Bring up Argument Lookup

SHIFT+CTRL+SPACEBAR

Comment

SHIFT+CTRL+C

Uncomment

SHIFT+CTRL+N

Indent

SHIFT+CTRL+I

Outdent

SHIFT+CTRL+O

Uppercase

SHIFT+CTRL+U

Lowercase

SHIFT+CTRL+L

Quick Find

CTRL+Alt+F

Find

CTRL+F

Find Next

F3

Replace

CTRL+Alt+R

Go to Line

CTRL+Alt+G

Select All

CTRL A

Cut

CTRL X

Copy

CTRL C

Paste

CTRL V

Undo

CTRL Z

Save

CTRL S

 

Related Topic

SQL Information and Functions

Send SQL Statement to SQL Optimizer

Performance improvement could be obtained through the SQL Optimizer window by transforming the SQL syntax into equivalent statements with different query plans.

If you are in a module that has a SQL Text pane, you can send a SQL statement to the SQL Optimizer.

To send a SQL statement to the SQL Optimizer and automatically start the optimization process

  1. Select the SQL statement you want to optimize.

  2. Click Send to SQL Optimizer image\B_SendToSQLOptimizer.gif.

Supported SQL Statements

The SQL Optimizer only supports a single SELECT, SELECT INTO, INSERT, UPDATE or DELETE SQL statement.

Setting Database and User

When you optimize a SQL statement, create a temp table, or execute a SQL statement, you must have the right database selected and your logon must have access to the tables used in the SQL statement.

In the bottom left corner of the main window are find two drop-down lists: one for databases and the other for users. Select the appropriate database and user. This is equivalent to perform a USE and SETUSER commands.

SQL from the SQL Scanner

You receive the following warning message if your current database and user do not match the one previously used to retrieve the query plan of the SQL statement. Click Yes to have the database and user automatically changed for you and continue with the optimization process.

"Your current connection is not the same as the scanned SQL statement. Do you want to change the database to 'database_name' and user to 'username' now to continue with the optimization?

SQL in a Cursor

If the SQL statement is used within a cursor declaration the SQL for cursor checkbox is automatically selected.

SQL with Temporary Tables

If the SQL statement uses a temporary table and the SQL Scanner found the CREATE TABLE or SELECT INTO statement for creating the table, then the User-Defined Temp Table window is automatically opened and the DDL for creating and populating is entered ready for you to execute it.

 

Related Topic

Copy to SQL Worksheet

SQL statements can be executed in the SQL Worksheet. If you are in a module that has a SQL Text pane, you can copy a SQL statement to the SQL Worksheet.

To copy a SQL statement to the SQL Worksheet

  1. Select the SQL statement you want to execute.

  2. Click Copy to SQL Worksheet image\B_CopyToSQLWorksheet.gif.

The selected SQL statement is copied to Editor pane of the SQL Worksheet window.

 

Related Topic

Related Documents

The document was helpful.

Select Rating

I easily found the information I needed.

Select Rating