I. Creating index Considerations
1. Estimated Index size
2. View the amount of space available in the Index table space
3. View temporary table space size
4. Creation of business idle period
5, can consider the online, parallel, nologging mode
Second, the estimation index method
The procedure is as follows:
Sql> explain plan for CREATE index idx_object_id on TT (OBJECT_ID);
explained.
Sql> Set Lines pages 1000
Sql> select * FROM table (Dbms_xplan.display ());
Plan_table_output
--------------------------------------------------------------------------------------------------------------- ----------------
Plan Hash value:3757763116
----------------------------------------------------------------------------------------
| Id | Operation | Name | Rows | Bytes | Cost (%CPU) | Time |
----------------------------------------------------------------------------------------
| 0 | CREATE INDEX STATEMENT | | 2762k| 13m| 22958 (1) | 00:04:36 |
| 1 | INDEX BUILD NON unique| idx_object_id | | | | |
| 2 | SORT CREATE INDEX | | 2762k| 13m| | |
| 3 | TABLE ACCESS Full | TT | 2762k| 13m| 21560 (1) | 00:04:19 |
----------------------------------------------------------------------------------------
Plan_table_output
--------------------------------------------------------------------------------------------------------------- -----------------------------------------------------------------------------------------
Note
-----
-Estimated index size:67m bytes
Rows selected.
elapsed:00:00:00.01
Sql>
Oracle 11g Estimated Index size