The Optimized SQL information displays in the SQL Optimizer window after performing the Optimize function:
The top left pane allows you to select the of semantically equivalent SQL statements produced after optimization from the tabs at the bottom of the pane. The arrangement of the SQL statements on these tabs from left to right is the SQL Editor, then the Original, followed by optimized SQL statements starting with Alt1, Alt2, etc. The optimized SQL statements are ranked according to increasing Estimated I/O cost.
Note: The lower the Estimated I/O cost the better the estimated performance of the SQL statement. However, the cost value should not be used as the actual indication of performance.
Auto indentation format
All alternative SQL statements are transformed into a more readable format by automatically indenting and aligning.
Text color
All parameters are in red (default color), indicating that a value and data type needs to be defined upon execution. Other highlights are according to parameters set for syntax highlights under the Preferences window.
Comments
Comments can be entered in the original SQL statement but are not included in the SQL alternatives.
The top right pane, the SQL Information pane, displays detailed information about the SQL statement.
The Run Time information displays in three tabs in the bottom pane:
The Optimization Details window is optional and can be displayed after optimization. This window displays the following:
Time calculations for the optimization process.
Number of semantically equivalent SQL statements investigated
Number of alternative query plans produced.
How many SQL statements were eliminated because they had identical query plans.
A warning message if the Syntax Transformation Quota, Total Forces Quota, Parallel Quota, Total Quota, or Join Path Permutation Quota is reached.
Note: Generally speaking, SQL statements with the same query plan will produce the same run time because the database executes the SQL statement in the same way. Therefore, newly generated SQL statements with equivalent query plans are eliminated.
The Optimization Details window is shown every time optimization is finished unless it is disabled. This is done by unselecting the Show details on next optimization option in the Optimization Details window.
The Optimization Details window can be shown anytime after the optimization process by selecting View | Show Optimization Details when the SQL Optimizer window is the active window.
If no alternatives are available, the Advise Indexes button is shown for you to directly copy the original SQL statement from the SQL Optimizer to Index Advisor for generation index candidates. The generate process will start automatically.
The SQL Optimizer identifies variables defined within a SQL statement and highlights them in red in the SQL Optimizer window. When the test run process begins, the SQL Optimizer prompts you to enter a value for the variable and to select the data type from a list through the Parameters window.
Note: The value and data type entered on the Parameters window have a direct affect of the run time and query plan retrieved.
© 2024 Quest Software Inc. ALL RIGHTS RESERVED. Terms of Use Privacy Cookie Preference Center