Databases Reference
In-Depth Information
How it works...
In step 2, we simply execute some queries to populate the cursor cache (in this case we are
in a single-user test environment).
In step 3, we create an SQL Tuning Set, by calling test_tuning_set and assigning a
description to it. Then, in step 4, we populate the just-created tuning set, using the first
five statements in the cursor cache, ordered by elapsed time. We can see the output in
the following screenshot:
In step 5, we execute a query to view the statements that comprise our SQL Tuning Set, while
in step 6, we drop the tuning set to clean the database, revoking the grant from the user SH .
There's more...
In this recipe, we have seen how to create an SQL Tuning Set, which can be used along with
the SQL Tuning Advisor to tune a group of queries instead of a single query, or to create an
SQL baseline.
We can load an SQL Tuning Set also from another tuning set, or from the Advanced Workload
Repository. The SQL Tuning Set can be transported between different databases.
 
Search WWH ::




Custom Search