Oracle索引相关

来源:互联网 发布:帝国cms自定义模型 编辑:程序博客网 时间:2024/05/17 21:59

--创建索引
create index kg_yonghuxxkz1_cidxiazai on kg_yonghuxxkz1 (s_cid,d_xiacihbrq);

--找出某张表的所有索引 
select * from user_indexes where table_name= upper('kg_yonghuxxkz1')

--对索引添加监视
alter index KG_YONGHUXXKZ1_D_XIACIHBRQ
monitoring usage;

--查询语句
select /*+ RULE */ * from kg_yonghuxxkz1 where d_xiacihbrq >sysdate;

--查看索引是否被使用
select * from v$object_usage;

原创粉丝点击