After creating a SQL Performance Analyzer task and selecting a SQL tuning set as the input source, you need to establish the initial environment on the test system. Establishing the database environment on the test system involves manually making any necessary environmental changes that affect SQL optimization and performance. These changes may include changing initialization parameters, gathering or setting optimizer statistics, and creating indexes. It is recommended that you build a test system that is as similar to the production system as possible. The dedicated workflows in Enterprise Manager simplifies this process by creating both SQL trials automatically and performing the change restricted to the testing session. For information about setting up the database environment, see "Setting Up the Test System".
You can optionally run SQL trials on a remote system by providing access to a public database link. When conducting remote SQL trials, the database version of the remote database where the SQL statements are executed must be less than or equal to the database version of the database to which it connects. Starting with Oracle Database release 220.127.116.11, the remote database can be a read-only database, such as an Oracle Active Data Guard instance.
Once the environment on the test system is properly configured, you can build the pre-change version of performance data before performing the system change. You can build SQL trials using SQL Performance Analyzer by using one of the following methods:
Executing the SQL statements in the workload
Generating execution plans for the SQL statements in the workload
Loading performance data and execution plans from a SQL tuning set (APIs only)
For more information, see "Measuring the Pre-Change SQL Performance"
This chapter described how to create the pre-change SQL trial and contains the following topics:
The primary interface for creating a pre-change SQL trial is Oracle Enterprise Manager. If for some reason Oracle Enterprise Manager is unavailable, you can create a pre-change SQL trial using the
DBMS_SQLPA PL/SQL package.
Before creating a pre-change SQL trial, you need to create a SQL Performance Analyzer task, as described in Creating an Analysis Task .