Oracle DBMS_AUTO_INDEX
Version 19.3

General Information
Library Note Morgan's Library Page Header
Which has the higher priority in your organization: Deploying a new database or securing the ones you already have? Looking for a website, and resources, dedicated solely to securing Oracle databases? Check out DBSecWorx.
Purpose The Oracle Database periodically runs a task, SYS_AUTO_INDEX_TASK that monitors the system and creates indexes based on workload running in the system. This package contains subprograms that display the report of the task, configure task execution and behavior.
AUTHID DEFINER
Dependencies
ALL_CONSTRAINTS ALL_USERS DBMS_STANDARD
ALL_CONS_COLUMNS DBMS_AUTO_INDEX_INTERNAL DBMS_STATS_INTERNAL
ALL_INDEXES DBMS_REPORT PRVT_REPORT_TAGS
ALL_IND_COLUMNS DBMS_SMB XMLTYPE
ALL_TABLES    
Documented Yes
First Available 19c
Security Model Owned by SYS with EXECUTE granted to the DBA role.
Source {ORACLE_HOME}/rdbms/admin/dbmsai.sql
Subprograms
 
CONFIGURE (new 19c)
Sets configuration options for auto indexing. dbms_auto_index.configure(
parameter_name  IN VARCHAR2,
parameter_value IN VARCHAR2,
allow           IN BOOLEAN := TRUE);
exec dbms_auto_index.configure('AUTO_INDEX_REPORT_RETENTION', '90', TRUE);
 
DROP_SECONDARY_INDEXES (new 19c)
Drops indexes that are not used for constraints for given (optional) schema and table. If no schema is given, all indexes which the user has priviledges on will be dropped. If no table is given, all indexes within the given schema will be dropped. dbms_auto_index.drop_secondary_indexes(
ownname IN VARCHAR2 DEFAULT NULL,
tabname IN VARCHAR2 DEFAULT NULL);
exec dbms_auto_index.drop_secondary_indexes('UWCLASS', 'SERVERS');
 
REPORT_ACTIVITY (new 19c)
Reports the results of auto index executions between specified activity_start and activity_end dbms_auto_index.report_activity(
activity_start IN TIMESTAMP WITH TIME ZONE := SYSTIMESTAMP - 1,
activity_end   IN TIMESTAMP WITH TIME ZONE := SYSTIMESTAMP,
type           IN VARCHAR2 := 'TEXT',
section        IN VARCHAR2 := 'ALL',
level          IN VARCHAR2 := 'TYPICAL')
RETURN CLOB);
exec dbms_auto_index.report_activity(SYSTIMESTAMP-24, SYSTIMESTAMP, 'TEXT', 'INDEX_DETAILS', 'ALL');
 
REPORT_LAST_ACTIVITY (new 19c)
Reports the results of last auto index task execution dbms_auto_index.report_last_activity(
type    IN VARCHAR2 := 'TEXT',
section IN VARCHAR2 := 'ALL',
level   IN VARCHAR2 := 'TYPICAL')
RETURN CLOB;
spool /home/oracle/autoidx_last_activity.html

exec dbms_auto_index.report_last_activity('HTML', 'ALL', 'ALL');

spool off

Related Topics
Built-in Functions
Built-in Packages
DBMS_AUTO_INDEX_INTERNAL
DBMS_I_INDEX_UTL
DBMS_INDEX_UTL
DBMS_INDEXING
DBMS_PCLXUTIL
DBMS_SPACE.CREATE_INDEX_COST
Indexes
What's New In 18c
What's New In 19c

Morgan's Library Page Footer
This site is maintained by Dan Morgan. Last Updated: This site is protected by copyright and trademark laws under U.S. and International law. © 1998-2019 Daniel A. Morgan All Rights Reserved
  DBSecWorx