1Z0-052 · Question #72
Examine the following output: SQL> SELECT index_name,status FROM dba_indexes WHERE status='UNUSABLE'; INDEX_NAME STATUS --------------- --------------- EIND UNUSABLE Which two statements about the…
The correct answer is A. It is ignored by the query optimizer. B. It is not used while the index is being rebuilt. An UNUSABLE index in Oracle is skipped by the query optimizer and remains inoperative until explicitly rebuilt. It can be repaired with ALTER INDEX ... REBUILD and is never automatically rebuilt by the database engine.
Question
Examine the following output:
SQL> SELECT index_name,status FROM dba_indexes WHERE status='UNUSABLE'; INDEX_NAME STATUS --------------- --------------- EIND UNUSABLE Which two statements about the above index are true? (Choose two.)
Options
- AIt is ignored by the query optimizer.
- BIt is not used while the index is being rebuilt.
- CThe index cannot be rebuilt, and has to be re-created.
- DThe index is automatically rebuilt when used the next time.
How the community answered
(51 responses)- A92% (47)
- C4% (2)
- D4% (2)
Why each option
An UNUSABLE index in Oracle is skipped by the query optimizer and remains inoperative until explicitly rebuilt. It can be repaired with ALTER INDEX ... REBUILD and is never automatically rebuilt by the database engine.
Oracle's query optimizer completely ignores indexes in UNUSABLE status when generating execution plans, meaning full table scans or other access paths will be chosen instead - this is a deliberate design to prevent errors from corrupted or incomplete index structures.
When an index rebuild operation is in progress, the index remains in UNUSABLE status and is therefore not consulted by the optimizer or DML operations until the rebuild completes and the status returns to VALID.
An UNUSABLE index can be repaired by issuing ALTER INDEX index_name REBUILD - dropping and re-creating it is not required.
Oracle does not have any mechanism to automatically rebuild indexes; an UNUSABLE index will remain in that state indefinitely until a DBA explicitly issues a rebuild command.
Concept tested: Oracle UNUSABLE index status behavior and rebuild options
Source: https://docs.oracle.com/en/database/oracle/oracle-database/19/admin/managing-indexes.html
Topics
Community Discussion
No community discussion yet for this question.