ITPub博客

首页 > 数据库 > Oracle > 索引监控

索引监控

原创 Oracle 作者:huzhichengforce 时间:2014-05-31 18:10:05 0 删除 编辑
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/ ,如需转载,请注明出处,否则将追究法律责任。

请登录后发表评论 登录
全部评论

注册时间:2012-08-19

  • 博文量
    202
  • 访问量
    518270