One of the top 10g features of Oracle is the Advisory Framework, which is a collection of optimization consultants that can help you make full use of your database. One of them, the SQL Access Advisor, recommends that you change the indexes and materialized views in the schema to improve performance.
However, since the Advisory Framework is generalized to support a variety of different consultants, It is very cumbersome to navigate all stored procedures and functions in the DBMS_ADVISOR package. A CREATE_TASK process initializes a new optimization task, a SET_TASK_PARAMETER process modifies the default parameters, and a load object is created in the CTEATE_SQLWKLD process.
Oracle 10g version 2 adds a QUITE_TUNE process to the DBMS_ADVISOR package. By default, most parameters are required for this process to create a consultant and adjust the interface. In addition to creating a load object (the optimized QSL statement table), it also directly submits a separate SQL statement to the process.
To use the QUITE_TUNE process-or any other tool in the DBMS_ADVISOR package-the user must have the advisor permission. In addition, you must have at least the selection permission for the table referenced in the query. Then, simply call the process. As shown in list.
You can view the running results in various DBA _ views. DBA_ADIVSOR_LOG lists your tasks and the number of suggestions it generates. You can see these suggestions in the DBA_ADVISOR_RECOMMENDATIONS view. A single command can be found in the DBA_ADVISOR_ACTIONS view.
You can also have DBMS_ADVISOR generate the complete SQL script required to execute the recommended behavior. The GET_TASK_SCRIPT function returns a SLOB containing the script.
List B displays the running result of list. Because the AMOUNT_SOLD column used by the WHERE clause is not indexed, You need to perform a full table scan to process this statement. In addition, it implies that this is a bitmap index, because the data in the column has many duplicate values.