标记未使用的索引
A、 开始监测索引的使用
Alter index hr.emp_name_ix monitoring usage;
B、 停止监测索引的使用
Alter index hr.emp_name_ix nomonitoring usage;
C、 查询索引的使用情况
Select index_name,used from v$object_usage;
删除未使用过的索引,可以降低DML操作的成本,从而提升系统性能。
启动索引使用的监测:
alter index f1zs_sc.PK_DV_SITE_INFO monitoring usage;
alter index f1zs_sc.IDX_DV_SITE_INFO_GIS_ID monitoring usage;
alter index f1zs_sc.dv_site_type_id monitoring usage;
alter index f1zs_sc.index_line monitoring usage;
alter index f1zs_sc.index_upper_siteid monitoring usage;
alter index f1zs_sc.idx_fs_up_id monitoring usage;
alter index f1zs_sc.idx_fs_fs_code monitoring usage;
停止索引使用的监测:
alter index f1zs_sc.PK_DV_SITE_INFO nomonitoring usage;
alter index f1zs_sc.IDX_DV_SITE_INFO_GIS_ID nomonitoring usage;
alter index f1zs_sc.dv_site_type_id nomonitoring usage;
alter index f1zs_sc.index_line nomonitoring usage;
alter index f1zs_sc.index_upper_siteid nomonitoring usage;
alter index f1zs_sc.idx_fs_up_id nomonitoring usage;
alter index f1zs_sc.idx_fs_fs_code nomonitoring usage;
查询相关视图,了解索引的使用情况:
Select index_name,used from v$object_usage;
来自 “ ITPUB博客 ” ,链接:https://blog.itpub.net/32980/viewspace-675589/ ,如需转载,请注明出处,否则将追究法律责任。