column owner format a30 column index_name format a30 column table_owner format a30 column table_name format a30
select owner, index_name, index_type, table_owner, table_name table_type from dba_indexes where auto = 'YES' order by owner, index_name;
活动报告
DBMS_AUTO_INDEX包含有两个报告函数
1 2 3 4 5 6 7 8 9 10 11 12 13
DBMS_AUTO_INDEX.REPORT_ACTIVITY ( activity_start IN TIMESTAMP WITH TIME ZONE DEFAULT SYSTIMESTAMP - 1, activity_end IN TIMESTAMP WITH TIME ZONE DEFAULT SYSTIMESTAMP, type IN VARCHAR2 DEFAULT 'TEXT', section IN VARCHAR2 DEFAULT 'ALL', level IN VARCHAR2 DEFAULT 'TYPICAL') RETURN CLOB;
DBMS_AUTO_INDEX.REPORT_LAST_ACTIVITY ( type IN VARCHAR2 DEFAULT 'TEXT', section IN VARCHAR2 DEFAULT 'ALL', level IN VARCHAR2 DEFAULT 'TYPICAL') RETURN CLOB;
SQL> select dbms_auto_index.report_activity() from dual;
DBMS_AUTO_INDEX.REPORT_ACTIVITY() ------------------------------------------------------------------------------- GENERAL INFORMATION ------------------------------------------------------------------------------- Activity start : 29-AUG-2024 14:39:03 Activity end : 30-AUG-2024 14:39:03 Executions completed : 5 Executions interrupted : 0 Executions with fatal error : 0 -------------------------------------------------------------------------------
SUMMARY (AUTO INDEXES) ------------------------------------------------------------------------------- Index candidates : 1 Indexes created (visible / invisible) : 1 (1 / 0) Space used (visible / invisible) : 2.1 MB (2.1 MB / 0 B) Indexes dropped : 0 SQL statements verified : 8 SQL statements improved (improvement factor) : 8 (452.4x) SQL plan baselines created : 0 Overall improvement factor : 452.4x -------------------------------------------------------------------------------
SUMMARY (MANUAL INDEXES) ------------------------------------------------------------------------------- Unused indexes : 0 Space used : 0 B Unusable indexes : 0 -------------------------------------------------------------------------------
INDEX DETAILS ------------------------------------------------------------------------------- 1. The following indexes were created: ------------------------------------------------------------------------------- -------------------------------------------------------------------------- | Owner | Table | Index | Key | Type | Properties | -------------------------------------------------------------------------- | XB | T1 | SYS_AI_5acfcndg6cqp6 | OBJECT_ID | B-TREE | NONE | -------------------------------------------------------------------------- -------------------------------------------------------------------------------
VERIFICATION DETAILS ------------------------------------------------------------------------------- 1. The performance of the following statements improved: ------------------------------------------------------------------------------- Parsing Schema Name : XB SQL ID : 0y6kdntmqahh8 SQL Text : select * from t1 where object_id=15 Improvement Factor : 452x
Execution Statistics: ----------------------------- Original Plan Auto Index Plan ---------------------------- ---------------------------- Elapsed Time (s): 9470 276 CPU Time (s): 6299 223 Buffer Gets: 1808 3 Optimizer Cost: 128 1 Disk Reads: 0 4 Direct Writes: 0 0 Rows Processed: 4 1 Executions: 4 1