Method: 1. Use the "select status from user_indexes where index_name='index name'" statement. If the result returns VALID, the index has not expired; 2. Use the "select status from DBA_IND_PARTITIONS" statement to view the partition index status. ;3. Use "select status from dba_indexes" to view the normal index status.
The operating environment of this tutorial: Windows 10 system, Oracle version 12c, Dell G3 computer.
1. Open PLSQL, enter your account password, and log in to the database where you need to determine the index status. Open the SQL window and enter the following SQL
select status from user_indexes where index_name='索引名称';
If the returned result is VALID, it means the index is valid!
#2. Execute the following statement under the corresponding user:
select status from DBA_IND_PARTITIONS --分区索引
If the status is not VALID, then it is an invalid index.
3. Execute the statement under the corresponding user
select status from dba_indexes --普通索引
If the status is not VALID, then it is an invalid index.
Extension:
ORACLE View the index status of a table
##Status column STATUS description: Valid: The current index is valid N/A: The partition index is valid Unusable: The index is invalidRecommended tutorial: "Oracle Video Tutorial"
The above is the detailed content of How to check index failure in oracle. For more information, please follow other related articles on the PHP Chinese website!