If there is a failure index in the database, so that the failure Index table related operations in the access to the index but there is a large number of full-table scan, which is extremely resource-intensive, it must be on-line reconstruction of these failed indexes. The steps to rebuild the failed index are as follows:
1. Query database with or without a failed index
Select owner,table_name,index_name,status,last_analyzed from dba_indexes where status= ' unsable ';
2. If there is an invalid index, the index should be rebuilt online
Alter index MW_APP.IND_T_ID rebuild online;
3. Whether the query index is rebuilt well
Annotations: If the index status of the query is ' VALID ', the index has been rebuilt well.
Select owner,table_name,index_name,status,last_analyzed from dba_indexes where index_name= ' ind_t_id ';
4. Re-query the database for any invalid indexes
Annotations: The query does not have a record, indicating that there are no invalid indexes in the database, and that the failed index has all been rebuilt.
Select owner,table_name,index_name,status,last_analyzed from dba_indexes where status= ' unsable ';
Rebuilding a failed Index