11 Analyzing the Impact of Database Changes on SQL Performance
SQL Performance Analyzer Quick Check (SPA Quick Check) and SQL Performance Analyzer can assess the effects of database changes on SQL performance.
The following sections describe SPA Quick Check and SQL Performance Analyzer:
11.1 About SPA Quick Check
SQL Performance Analyzer Quick Check (SPA Quick Check) validates the impact of a database change to SQL performance before you make the change.
SPA Quick Check is available on certain EM Express database management pages where changes to the database could affect performance.
Use SPA Quick Check to validate what the impact to SQL performance will be for:
-
Changing the value of a session-modifiable initialization parameter
-
Implementing SQL profiles
You must configure SPA Quick Check before using it.
11.2 About Configuring SPA Quick Check
This section provides an overview of SPA Quick Check configuration.
Before you can use SPA Quick Check to validate the impact of database changes, you must specify default settings for SPA Quick Check.
As one of the SPA Quick Check default settings, you specify a default SQL tuning set for SPA Quick Check to use. This SQL tuning set should include the SQL statements whose performance you want to analyze.
11.2.1 About SQL Tuning Sets
A SQL tuning set (STS) is a database object that includes one or more SQL statements along with their execution statistics and execution context.
You can use APIs to create a SQL tuning set, load SQL statements into the SQL tuning set, and transport the SQL tuning set to another system (such as a test system that is very similar to your production system).
Before you use SQL Performance Analyzer or SQL Performance Analyzer Quick Check (SPA Quick Check) in EM Express, you must specify default settings for them. These tools require a SQL tuning set that includes the SQL statement or statements whose performance you want to analyze.
See Also:
-
Oracle Database SQL Tuning Guide for information about creating a SQL tuning set
-
Oracle Database SQL Tuning Guide for information about loading a SQL tuning set
-
Oracle Database SQL Tuning Guide for information about transporting a SQL tuning set
11.3 About Validating the Impact of an Initialization Parameter Change
Before you change the value of a session-modifiable database initialization parameter, you can validate the impact of that change on your database workload by using SPA Quick Check.
Session-modifiable parameters are initialization parameters whose values can be changed using the ALTER SESSION
statement.
11.4 About Validating the Impact of Implementing a SQL Profile
Before you implement a SQL profile that SQL Tuning Advisor has recommended for a SQL statement, you can use SPA Quick Check to validate the impact of implementing the SQL profile for that statement.
After you tune a SQL statement using SQL Tuning Advisor, the Tuning Result page for that SQL statement lists tuning recommendations in the Select Recommendation section at the bottom of the page. If one of the tuning recommendations is to create a SQL profile for the statement, the Type column displays a value of SQL Profile for that recommendation, and the Validate with SPA button appears in the Select Recommendations section.
11.4.1 Validating the Impact of Implementing a SQL Profile
You can use SPA Quick Check to validate the impact of implementing a SQL profile that SQL Tuning Advisor has recommended.
11.4.2 About Validating the Impact of Implementing Multiple SQL Profiles
Before you implement multiple SQL profiles that have been recommended by SQL Tuning Advisor, you can use SPA Quick Check to validate the impact of implementing those SQL profiles on your workload.
Multiple SQL profile recommendations can appear on these EM Express pages:
-
If Automatic SQL Tuning Advisor is enabled, the Automatic tab on the SQL Tuning Advisor page can include multiple SQL profile recommendations for statements listed in the Top SQL Statements section at the bottom of the tab.
-
On the Tuning Task Result page for a SQL tuning task. A SQL tuning task can include multiple SQL statements for which SQL Tuning Advisor recommends implementing SQL profiles. The Manual tab on the SQL Tuning Advisor page lists SQL tuning tasks, and you can select a task and click View Result to see all the recommendations for that task.
If SQL Performance Analyzer has recommended implementing multiple SQL profiles on an EM Express page, the Top SQL Statements section of the page includes the Validate All Profiles with SPA button.
11.5 About SQL Performance Analyzer
SQL Performance Analyzer automates the process of assessing the overall effect of a database change on a SQL workload by identifying performance divergence for each SQL statement.
A report that shows the net impact on the workload performance due to the change is provided. For regressed SQL statements, SQL Performance Analyzer also provides appropriate execution plan details along with tuning recommendations. As a result, you can remedy any negative outcome before the end users are affected. Furthermore, you can validate (with significant time and cost savings) that the system change to the production environment will result in net improvement.
Before you can use SQL Performance Analyzer, you must have a SQL tuning set that includes the SQL statements whose performance you want to analyze, and you must specify SQL Performance Analyzer default settings.
A SQL Performance Analyzer task is a container that encapsulates all of the data about a complete SQL Performance Analyzer analysis. A SQL Performance Analyzer analysis comprises at least two SQL trials and a comparison. A SQL trial encapsulates the execution performance of a SQL tuning set under specific environmental conditions. When you create a SQL Performance Analyzer task, you select a SQL tuning set as its input source, and when you run SQL trials, the SQL tuning set is used as the source for SQL statements.
After you create a SQL Performance Analyzer task, you create a pre-change SQL trial. Then you make the database change whose SQL performance impact you want to assess. After making the database change, you create a post-change SQL trial. Finally, you compare the two trials.
A SQL Performance Analyzer analysis shows the impact of the environmental differences between the two trials.
11.6 Specifying Default Settings for SQL Performance Analyzer
Before you use SQL Performance Analyzer, you have the option of changing the default settings for the tool.
11.6.1 Creating a SQL Performance Analyzer Task
You create a SQL Performance Analyzer task using a SQL tuning set as its input source.
After creating a SQL Performance Analyzer task, you can create a SQL trial. Typically, you create a pre-change SQL trial, make a database change, and then create a post-change SQL trial.
11.6.2 Creating a Pre-Change SQL Trial
After you create a SQL Performance Analyzer task, you can use SQL Performance Analyzer to create a pre-change SQL trial.
After the pre-change SQL trial is complete, make the database change whose impact on SQL performance you want to assess, and then create a post-change SQL trial.
11.6.3 Creating a Post-Change SQL Trial
After you create a pre-change SQL trial and make a database change, you can create a post-change SQL trial.
After the post-change SQL trial is complete, you can compare the pre-change SQL trial and the post-change SQL trial to assess the SQL performance impact of the database change.
See Also:
11.6.4 Comparing Two SQL Trials
After a pre-change SQL trial and a post-change SQL trial have been created, you can use SQL Performance Analyzer to compare the two SQL trials to assess the impact of the database change on SQL performance.
The Top SQL Statements section shows a comparison of the top SQL statements for the two trials.
The Status column shows whether performance improved, regressed, or was unchanged for each of the statements.
Use the Category filter to show all the top SQL statements, or to show only the SQL statements in one of the available categories.
11.7 Analyzing the Impact of Database Changes on SQL Performance: Oracle by Example Series
Oracle By Example (OBE) has a series on the Oracle Database 2 Day DBA guide. This OBE series steps you through the tasks in this section, and includes annotated screenshots.
-
Analyze the Impact of Database Changes on SQL Performance
-
Create and Compare SQLTrials Using SQL Performance Analyzer
-
To see a clickable list of the above tutorials, go to Analyze the Overall Impact of Database Changes on SQL Performance Series.
-
For seamless navigation through the tutorial series, access the following link:
Analyze the Overall Impact of Database Changes on SQL Performance
You can navigate across the tutorials by clicking the > button at the bottom of the pane.