SELECT 'alter index ' || owner || '.' || index_name || ' monitoring usage;'
AS "Monitor Indices Script"
FROM dba_indexes
WHERE owner IN ('HZWSJ') AND table_name = 'EHR_HEALTHRECORD'
#################################################################
启用索引监控
alter index :index_name monitoring usage;
查询监控状态
select * from v$object_usage;
关闭索引监控
alter index :index_name nomonitoring usage;
################################################################
V$OBJECT_USAGE 介绍
V$OBJECT_USAGE displays statistics about index usage gathered from the database for the indexes owned by the current user. You can use this view to monitor index usage. All indexes that have been used at least once can be monitored and displayed in this view.
来自 “ ITPUB博客 ” ,链接:https://blog.itpub.net/26764973/viewspace-1173612/
,如需转载,请注明出处,否则将追究法律责任。