ORACLE重建索引

重建索引(重建索引方法很多,不同方法的适用条件不通,此处只列出一种)

alter index 索引名称 rebuild tablespace DELL_SPACE online;

索引分析

analyze index 索引名称 validate structure;
select (del_lf_rows_len/lf_rows_len) from index_stats where name='索引名称';

查询索引深度

Select index_name,blevel from dba_indexes where blevel>=4; //大于等于4时,需要重建索引
Select index_name,blevel from dba_indexes where index_name='索引名称';

查询索引

//表上有哪些索引,状态如何
select status,T.* from user_indexes T where table_name=upper('表名');
//查询某个索引的状态
select status,index_name from user_indexes s where index_name=upper('索引名称');
//查询分区索引
select status,index_name from user_ind_partitions s where index_name=upper('索引名称');

你可能感兴趣的:(oracle)