Databases Reference
In-Depth Information
How it works...
In step 2, we create an SQL Tuning Task, based on the following query:
SELECT AMOUNT_SOLD FROM sh.SALES S
WHERE S.CUST_ID IN (
SELECT C.CUST_ID FROM sh.CUSTOMERS C
WHERE C.CUST_CREDIT_LIMIT IN (:l1, :l2, :l3)
)
We use the
CREATE_TUNING_TASK
procedure of the
DBMS_SQLTUNE
package,
indicating—among other parameters—the SQL statement, the values for bind variables, and
the task name and description.
In step 3, we execute the SQL Tuning Task just created,
test_tuning_task
, obtaining the
following results:
In step 4, we use the
REPORT_TUNING_TASK
function of the
DBMS_SQLTUNE
package to
obtain the results of the tuning task execution.