Table is dropped - Associated indexes drop automatically - Oracle Indexes and Partitioned Tables

Q.  If a table is dropped, all associated indexes are dropped automatically.
- Published on 27 Jul 15

a. True
b. False

ANSWER: True
 

    Discussion

  • Nirja Shah   -Posted on 29 Sep 15
    - To drop an index, the index must be contained in your schema, or you must have the DROP ANY INDEX system privilege.

    - Some reasons for dropping an index include:

    1. The index is no longer required.
    2. The index is not providing anticipated performance improvements for queries issued against the associated table. For example, the table might be very small, or there might be many rows in the table but very few index entries.
    3. Applications do not use the index to query the data.
    4. The index has become invalid and must be dropped before being rebuilt.
    5. The index has become too fragmented and must be dropped before being rebuilt.

    - When you drop an index, all extents of the index segment are returned to the containing tablespace and become available for other objects in the tablespace.

    - How you drop an index depends on whether you created the index explicitly with a CREATE INDEX statement, or implicitly by defining a key constraint on a table.

    - If you created the index explicitly with the CREATE INDEX statement, then you can drop the index with the DROP INDEX statement.

    - The following statement drops the emp_ename index:

    DROP INDEX emp_ename;

    - You cannot drop only the index associated with an enabled UNIQUE key or PRIMARY KEY constraint.

    - To drop a constraints associated index, you must disable or drop the constraint itself.

Post your comment / Share knowledge


Enter the code shown above:

(Note: If you cannot read the numbers in the above image, reload the page to generate a new one.)