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

Retrieve Run Result

To retrieve Run Result data from the database

Click image\B_RunResult.gif in the SQL Optimizer window.

If the original SQL statement contains a result set then the Run Result window displays the data retrieved; otherwise it will display an information dialog field showing the number of rows affected.

You can display up to 4 result sets in the Run Result window.

Notes:

  • When you are in the SQL Editor, you are prompted to commit or rollback all affected records for UPDATE, INSERT and DELETE SQL statements.
  • For UPDATE, INSERT and DELETE SQL statements, while retrieving the run time and run result you may encounter the following Adaptive Server error message:

    Can't allocate space for object 'syslogs' in database 'sqlexp' because the 'logsegment' segment is full. If you ran out of space in syslogs, dump the transaction log. Otherwise, use ALTER DATABASE or sp_extendsegment to increase the size of the segment.

This is due to the lack of space in system table (syslogs), in which all changes to the database are recorded. Empty the transaction log in the database and re-execute. Use the following command in the SQL Workshop module:

DUMP TRANSACTION database_name WITH TRUNCATE_ONLY

go

 

Related Topic

Commit or Rollback

If you execute Run Result from within the SQL Editor pane in the SQL Optimizer window, two types of action - commit or rollback - can be made after the Run Result is executed. In this case, you are prompted to commit or rollback for UPDATE, INSERT, DELETE and SELECT INTO SQL statements.

For the optimized SQL, all records affected by the UPDATE, INSERT, DELETE, and SELECT INTO SQL statements are rolled back automatically.

 

Terminate Retrieval of Run Result

You must logon with sa to terminate SQL statements with a result set, i.e., SELECT SQL statements. Run Result for SQL statements without result set (for example: INSERT, UPDATE, DELETE and SELECT with INTO clause) can be terminated by any logon account.

To terminate the Run Result process

Click image\B_AbortRunResut.gif.

 

SQL Comparer

Related Documents