Test Run SQL Alternatives
Note: This topic focuses on information that may be unfamiliar to you. It does not include all step and field descriptions.
Use SQL Optimizer to perform test runs on alternatives in order to view their run-time statistics. You can test run a single statement, selected statements, or all statements. Use the Test Run Single SQL function to retrieve run-time statistics for a single statement.
Use the Test Run function to perform multiple test runs on selected or all statements. These functions allow you to get run-time statistics for selected SQL or average run-time statistics for all SQL.
Note: SQL Optimizer automatically rolls back any changes made to the database if the SQL is an INSERT, UPDATE, DELETE, or MERGE statement. This maintains the integrity of your data and provides that the initial data is the same for each SQL alternative so that the test is comparable.
Test Run Single SQL Function
Perform a test run on a single SQL statement run to get run-time statistics.
To test run a single statement
-
Select the Optimize tab.
- Select a SQL statement in the Alternatives pane.
-
Click .
Test Run Function
To test run all statements
- Select the Optimize tab.
- Click the arrow beside and select Test Run - All.
- Use the tabs to select test run criteria.
To test run selected statements
- Select the Optimize tab.
-
In the Alternatives pane, select multiple SQL statements in one of the following ways:
- To select a consecutive group of SQL statements, click the first SQL, press and hold SHIFT, and then click the last SQL.
- To select non-consecutive SQL statements, press and hold CTRL, and then click each SQL that you want to select.
- Click the arrow beside and select Test Run - Selected.
- Use the tabs to select test run criteria.
Session Test Run Criteria
Every session can have its own test run settings. See the following topics for more information:
Tips:
- You can change Test Run settings globally on the Test Run Options page. Test Run Settings Options
- Click to stop the test run process.
- You can select an executing SQL statement and click to abort only the selected statement.
Multiple Test Runs Function
To test run all statements multiple times
- Select the Optimize tab.
- Click the arrow beside and select Multiple Test Runs - All.
-
Enter the number of times you want each SQL statement executed.
To test run selected statements multiple times
- Select the Optimize tab.
-
In the Alternatives pane, select multiple SQL statements in one of the following ways:
- To select a consecutive group of SQL statements, click the first SQL, press and hold SHIFT, and then click the last SQL.
- To select non-consecutive SQL statements, press and hold CTRL, and then click each SQL that you want to select.
- Click the arrow beside and select Multiple Test Runs - Selected.
- Enter the number of times you want each SQL statement executed..
Related Topics