dba_indexes和dba_ind_columns里面的索引数量不一样的,是怎么回事select count(distinct index_name) from
dba_indexes和dba_ind_columns里面的索引数量不一样的,是怎么回事
select count(distinct index_name) from dba_indexes
和
select count(distinct index_name) from dba_ind_columns
结果不一致,有人知道是怎么回事吗? 两个视图有啥区别?
- SQL code
SQL> select count(distinct index_name) from dba_indexes;COUNT(DISTINCTINDEX_NAME)------------------------- 4788SQL> select count(distinct index_name) from dba_ind_columns;COUNT(DISTINCTINDEX_NAME)------------------------- 3887
[解决办法]
- SQL code
--不一样很正常的,执行这个就应一样了purge recyclebin;/--LOB类型的在dba_ind_columns是不存在的select count(distinct index_name) from dba_indexes where index_type<>'LOB';/--正常情况下,此处会含有回收站中的select count(distinct index_name) from dba_ind_columns;/
