前幾天遇到一個問題
SQL> SHOW USER
USER is
SQL> CREATE TABLE T(ID INT
Table created
SQL> CREATE INDEX T_ID_IDX ON T(ID) GLOBAL
Index created
SQL> COL INDEX_NAME FORMAT A
SQL> COL PARTITION_NAME FORMAT A
SQL> SELECT INDEX_NAME
INDEX_NAME PARTITION_NAME
T_ID_IDX SYS_P
T_ID_IDX SYS_P
T_ID_IDX SYS_P
T_ID_IDX SYS_P
T_ID_IDX SYS_P
T_ID_IDX SYS_P
T_ID_IDX SYS_P
T_ID_IDX SYS_P
T_ID_IDX SYS_P
T_ID_IDX SYS_P
T_ID_IDX SYS_P
T_ID_IDX SYS_P
T_ID_IDX SYS_P
T_ID_IDX SYS_P
T_ID_IDX SYS_P
T_ID_IDX SYS_P
T_ID_IDX SYS_P
T_ID_IDX SYS_P
T_ID_IDX SYS_P
T_ID_IDX SYS_P
T_ID_IDX SYS_P
T_ID_IDX SYS_P
T_ID_IDX SYS_P
T_ID_IDX SYS_P
T_ID_IDX SYS_P
T_ID_IDX SYS_P
T_ID_IDX SYS_P
T_ID_IDX SYS_P
T_ID_IDX SYS_P
T_ID_IDX SYS_P
T_ID_IDX SYS_P
T_ID_IDX SYS_P
SQL> INSERT INTO T SELECT OBJECT_ID
SQL> COMMIT;
Commit complete
SQL> EXEC DBMS_STATS
PL/SQL procedure successfully completed
SQL> EXPLAIN PLAN FOR ALTER INDEX T_ID_IDX REBUILD PARTITION SYS_P
Explained
SQL> SELECT * FROM TABLE(DBMS_XPLAN
PLAN_TABLE_OUTPUT
Plan hash value:
| Id | Operation | Name | Rows | Bytes | Cost | Pstart| Pstop |
|
|
|
|
|
Note
SQL> EXPLAIN PLAN FOR ALTER INDEX T_ID_IDX REBUILD PARTITION SYS_P
Explained
SQL> SELECT * FROM TABLE(DBMS_XPLAN
PLAN_TABLE_OUTPUT
Plan hash value:
| Id | Operation | Name | Rows | Bytes | Cost | Pstart| Pstop |
|
|
|
|
|*
Predicate Information (identified by operation id):
Note
SQL> EXPLAIN PLAN FOR ALTER INDEX T_ID_IDX REBUILD PARTITION SYS_P
Explained
SQL> SELECT * FROM TABLE(DBMS_XPLAN
PLAN_TABLE_OUTPUT
Plan hash value:
| Id | Operation | Name | Rows | Bytes | Cost | Pstart| Pstop |
|
|
|
|
|
Note
SQL> EXPLAIN PLAN FOR ALTER INDEX T_ID_IDX REBUILD PARTITION SYS_P
Explained
SQL> SELECT * FROM TABLE(DBMS_XPLAN
PLAN_TABLE_OUTPUT
Plan hash value:
| Id | Operation | Name | Rows | Bytes | Cost | Pstart| Pstop |
|
|
|
|
|*
Predicate Information (identified by operation id):
Note
可以看到
From:http://tw.wingwit.com/Article/program/Oracle/201311/18578.html