View Oracle automatic optimization recommendations
After Oracle has been running for a period of time, the system automatically gives some tuning suggestions, which are placed in the dba_advisor_actions view. The main fields of the view are as follows:
Task_name-name of the optimization task
Execution_name-execution name
Object_id-object ID
Command-commands used
Attr1-specific commands: for example, alter table xxx shrink space
Attr2-specific commands: for example, alter table xxx shrink space compact
Attr3-specific commands: for example, alter table xxx enable row movement
Attr4
Attr5-Index recommendation. When attr4 = BTREE, attr5 gives the name of the column to be indexed, and attr3 is the table name
Attr6
Message-A description of optimization in Chinese
-- View system automatic optimization recommendations (from the day before the report), 'SYS_AUTO_SQL_TUNING_TASK' is system customized
Select dbms_sqltune.report_tuning_task ('SYS_AUTO_SQL_TUNING_TASK') from dual
-- View a range of reports, with begin_exec and end_exec taken from the value of the execution_name field
Select dbms_sqltune.report_auto_tuning_task (begin_exec = > 'EXEC_5815',end_exec = >' EXEC_6166') from dual
-- View the tuning report of execution_name
Select dbms_sqltune.report_tuning_task (task_name = > 'SYS_AUTO_SQL_TUNING_TASK', execution_name = >' EXEC_6166') from dual
-- View the tuning report of an object and take the value of object_id
Select dbms_sqltune.report_auto_tuning_task (object_id = > '33075') from dual
Through the above tuning recommendations, you can refer to the implementation of the optimization (the above can be implemented under an account with DBA permission).