To set Scan SQL options
Click in the main menu.
Select Scan SQL
Review the following for additional information:
Automatically start extracting SQL when job is added |
Select to automatically start scanning Scan SQL jobs you create. |
Skip SQL with comments |
Select to ignore SQL statements found within comments when scanning a job. Note: Selecting this option also affects scanning performed by Batch Optimize SQL. |
Skip SQL that involves only SYS.DUAL table |
Select to ignore SQL statements that use only the SYS.DUAL table when scanning a job. Note: Selecting this option also affects scanning performed by Batch Optimize SQL. |
Whole word matching for the first SQL keyword |
Select to ignore SELECT, INSERT, UPDATE, or DELETE when these keywords are preceded by other characters (for example, "abcSELECT" or "123SELECT" or "?SELECT"). Deselect (clear) to allow SQL Optimizer to extract the keywords listed above when preceded by other characters. Note: Selecting this option also affects scanning performed by Batch Optimize SQL. |
Number of characters skipped at the beginning of every line for all files |
Enter the number of characters to skip at the beginning of each line during scanning. Note: Selecting this option also affects scanning performed by Batch Optimize SQL. |
Skip end of line continuation character |
Click and select the continuation character to skip at the end of each line during scanning. Note: Selecting this option also affects scanning performed by Batch Optimize SQL. |
To set general Manage Plans options
Click in the main menu.
Select Manage Plans.
Review the following for additional information:
Show Manage Plans |
Select to display the Manage Plans tab in the main window. |
Using SQL Rewrite mode in Optimize SQL consists of two steps. In the first step, SQL Optimizer generates semantically equivalent alternatives with unique execution plans for your original SQL statement. An Oracle cost estimate displays for each alternative generated. In the second step, SQL Optimizer executes the alternatives to test each statement's performance. This provides execution times and run time statistics that allow you to find the best SQL statement for your database environment.
Tip: The Oracle cost only provides an estimate of resource usage to execute a SQL statement. Since statements with higher cost may perform better, you should test alternatives generated to determine the best statements for your database environment.
Select the Optimize SQL tab in the main window.
Select SQL Rewrite from the Optimize SQL start page.
Note: If the start page does not display, click the arrow beside and select New SQL Rewrite Session.
Enter a SQL statement in the Alternative Details pane.
Click to retrieve the execution plan for your SQL statement.The Select Connection and Schema window displays.
Click to optimize the SQL statement.
Click after SQL Optimizer completes the SQL rewrite process to compare your original SQL statement with the alternatives generated.
To test the alternatives SQL Optimizer generates, you can test run one or more selected alternatives to obtain actual execution statistics. This function does not affect network traffic since SQL Optimizer can provide these statistics without having to retrieve result sets from the database server. Additionally, data consistency is maintained when using SELECT, SELECT INTO, INSERT, DELETE, and UPDATE statements because these statements run in a transaction that is rolled back after execution.
To test a SQL statement alternative
The Test Run Settings dialog opens. Select criteria to apply to this test run. You can answer the questions on the Usage and Symptom page to allow SQL Optimizer to determine settings for you. Or you can click the Customize Test Run Settings link at the bottom of the page to manually specify test run settings.
Tip: You can specify default values for some Test Run Settings options by clicking and selecting Optimize SQL | Test Run.
Review the execution statistics in the Alternatives pane.
© 2024 Quest Software Inc. ALL RIGHTS RESERVED. Conditions d’utilisation Confidentialité Cookie Preference Center