To batch optimize SQL
-
Select the Batch Optimize tab in the main window.
-
Click Add Code to Optimize in the Batch Job List pane and select All Types. The Add Batch Optimize Jobs window displays.
-
Review the following for additional information:
Connection Page Description Connection
Click to select a previously created database connection.
Tips:
-
Click to open the Connection Manager to create a new connection.
-
You can select an alternative connection for executing the SQL statement alternatives Batch Optimize generates.
Database Objects Page Description Database objects
Select a schema, database object type, or individual database object, and then click to add the object.
Tip:
-
Click to browse for database objects.
-
Your database privileges determine if you can scan all selected database objects.
Execute using schema
Click and select an alternative schema for executing the SQL statement alternatives. Source Code Page Description Source code type
Select Text/Binary files, Oracle SQL *Plus Script, or COBOL programming source code to indicate the source code type for the file or directory you want to scan.
Add by file
Click and browse to the files you want to add.
Add by directory
Click and browse to the directories you want to add.
Note: Select the Include Sub-directory checkbox to scan sub-directories.
Scan using schema
Click and select a schema to scan.
Execute using schema
Click and select an alternative schema for executing the SQL statement alternatives. SQL Text Page Description SQL text
Enter SQL statement text. Scan using schema
Click and select a schema to scan. Execute using schema
Click and select an alternative schema for executing the SQL statement alternatives. Scan SQL Page Description Group
Select the Scanner group that contains the SQL statements you want to scan. Scan using schema
Click and select a schema to scan.
Execute using schema
Click and select an alternative schema for executing the SQL statement alternatives. Inspect SGA Page Description Group
Select the Inspector group that contains the SQL statements you want to scan.
Scan using schema
Click and select a schema to scan.
Execute using schema
Click and select an alternative schema for executing the SQL statement alternatives. Foglight Performance Analysis for Oracle Page
Description
Select a database to search for the repository used to store captured SQL
Click to select a previously created database connection, and then click Check for PA Repository to locate the repository.
Tip: Click to open the Connection Manager to create a new connection.
Note: Batch Optimize helps you manage jobs by organizing them into batches. Use the Batch Info page to create a new batch or to add the current job to an existing batch.
-
-
Click Finish to start batch optimization.
Batch Optimize scans the job you created, classifies and optimizes the statements, and executes the SQL statement alternatives it generates.
Notes:
-
Scanning starts automatically if you select the Automatically start extracting SQL when job is added checkbox in the Batch Optimize options page. Batch Optimize selects this checkbox by default.
-
Batch Optimize selects the SQL statement to optimize based on the classification types selected in the Batch Optimize options page. Batch Optimize selects Problematic and Complex SQL classification types by default.
-
Batch Optimize executes SQL alternatives it generates based on the statement types selected in the Batch Optimize options page. Batch Optimize selects SELECT statements by default.
-
-
Select Batch List in the Batch Job List pane to view information about the jobs you created.
The Batch List pane sorts information about your jobs by batches. Additional information displays in the Jobs Improved pane.
-
Select a batch from the batch list node to see details for the batch in the Job List pane.
The Job List pane displays the type of job, job status, and time of improvement for each job in the batch. Additional information displays in the SQL Classification and Cost and Elapsed Time Comparison panes for a selected job.
Tip: Select a job in the Job List pane and click to generate a replacement script with the optimized SQL statement.
-
Select a job from the batch node to see details of the job.
The SQL List pane displays SQL classification information for the SQL statements in the job you select. The Original SQL Text and Best Alternative SQL Text panes allow you to compare your original SQL statement with the best alternative Batch Optimize generated.
Tip: Select a SQL statement in the SQL List pane and click to send the statement to Optimize SQL and view all SQL alternatives.
Start the discussion at forums.toadworld.com