Table is dropped - Associated indexes drop automatically - Oracle Indexes and Partitioned Tables
Oracle (MCQ) questions and answers
Oracle Indexes and Partitioned Tables
Q. If a table is dropped, all associated indexes are dropped automatically.
- Published on 27 Jul 15
Oracle DBA (
Oracle Replication (
Oracle Architecture (
Oracle Transaction (
Administering and Managing an Oracle Database (
Managing Oracle Database Processes (
Oracle Control Files (
Oracle Redo Log (
Oracle Tablespaces (
Oracle Datafiles and Tempfiles (
Oracle Managed Files (
Oracle Schema (
Oracle Tables (
Oracle Indexes and Partitioned Tables (
Oracle Clusters (
Oracle Views, Sequences, and Synonyms (
Oracle Distributed Database concepts (
-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.)