查看索引状态:
SQL> select index_name, index_type, partitioned, status, global_stats
from dba_indexes
where
table_name = 'F_AGT_BUSINESS_CONTRACT_H'; 2 3 4
INDEX_NAME INDEX_TYPE PAR STATUS GLO
------------------------------ --------------------------- --- -------- ---
SYS_C0091072 NORMAL NO VALID NO
GLOBAL_STATS 不表示是本地索引还是全局索引
查看user_part_indexes
SQL> select * from user_part_indexes where index_name='SYS_C0091072';
no rows selected
此时没有记录
怎么才能让全局索引失效呢?
truncate 一个分区试试?
SQL> alter table dwf.f_agt_business_contract_h truncate partition p20101230;
Table truncated.
SQL> select index_name, index_type, partitioned, status, global_stats
from dba_indexes
where
table_name = 'F_AGT_BUSINESS_CONTRACT_H'; 2 3 4
INDEX_NAME INDEX_TYPE PAR STATUS GLO
------------------------------ --------------------------- --- -------- ---
SYS_C00
全局索引 truncate有数据的分区,索引失效,没数据的分区,索引不失效
最新推荐文章于 2021-04-03 23:29:44 发布