zoukankan      html  css  js  c++  java
  • oracle索引监控

    目的:监控oracle索引的有效性,看索引有没有被使用。然后根据监控结果删除或者调整索引。

    步骤:

    1.监控指定索引

       命令: alter index  索引名 monitoring usage;  如:alter index User_IDX1 monitoring usage;

    2.查看索引监控是否生效

      命令:select * from V$OBJECT_USAGE t where t.monitoring = 'YES';

    3.执行索引相关SQL

    4.查看索引是否被使用

      命令:select * from V$OBJECT_USAGE t where t.monitoring = 'YES';

    5.取消索引监控

      命令: alter index 索引名 nomonitoring usage;  如:alter index User_IDX1 nomonitoring usage;

    相关工具

      生成指定表所有索引监控命令的SQL:

        select 'alter index '||index_name||' monitoring usage;' from user_indexes where table_name=upper('表名');

        如:select 'alter index '||index_name||' monitoring usage;' from user_indexes where table_name=upper('User');

  • 相关阅读:
    观察者模式
    系统高并发网络图书室
    java keytool
    ant 脚本使用技巧
    Unsupported major.minor version 51.0 错误解决方案
    Oracle的网络监听配置
    win8 JDK环境变量不生效
    javax.mail
    xmlrpc
    网络时间同步
  • 原文地址:https://www.cnblogs.com/jacktang/p/4469179.html
Copyright © 2011-2022 走看看