Upgrade to Oracle Database 12c — Question 4
On your Oracle 12c database, you issue the following commands to create indexes:
SQL> CREATE INDEX oe.ord_customer_ix1 ON oe.orders (customer_id, sales_rep_id);
SQL> CREATE BITMAP INDEX oe.ord_customer_ix2 ON oe.orders (customer_id, sales_rep_id);
Which statement is correct?
Answer options
- A. Only the ORD_CUSTOMER_IX1 index is created and it is visible.
- B. Both the indexes are created and both of them are visible.
- C. Both the indexes are created; however, only the ORD_CUSTOMER_IX1 index is visible.
- D. Both the indexes are created; however, only the ORD_CUSTOMER_IX2 index is visible.
Correct answer: D
Explanation
In Oracle 12c, when a bitmap index is created, it is not visible to queries unless explicitly specified. Therefore, even though both indexes are created, only the bitmap index (ORD_CUSTOMER_IX2) is visible in this scenario. The other options are incorrect as they misrepresent the visibility of the indexes.