SP2-0611: Error enabling STATISTICS report
TYGER@ORCL>select * from TEST_MONITOR where object_id=111;
OWNER
------------------------------
OBJECT_NAME
--------------------------------------------------------------------------------
SUBOBJECT_NAME OBJECT_ID DATA_OBJECT_ID OBJECT_TYPE
------------------------------ ---------- -------------- -------------------
CREATED LAST_DDL_ TIMESTAMP STATUS T G S
--------- --------- ------------------- ------- - - -
SYS
I_ARGUMENT1
111 111 INDEX
30-JUN-05 30-JUN-05 2005-06-30:19:10:18 VALID N N N
Execution Plan
----------------------------------------------------------
Plan hash value: 2240611133
--------------------------------------------------------------------------------
----------------
| Id | Operation | Name | Rows | Bytes | Cost (%
CPU)| Time |
--------------------------------------------------------------------------------
----------------
| 0 | SELECT STATEMENT | | 1 | 177 | 2
(0)| 00:00:01 |
| 1 | TABLE ACCESS BY INDEX ROWID| TEST_MONITOR | 1 | 177 | 2
|* 2 | INDEX RANGE SCAN | TEST_MONITOR_IDX | 1 | | 1 // 上面执行的语句 走的是索引 TEST_MONITOR_IDX
(0)| 00:00:01 |
--------------------------------------------------------------------------------
----------------
Predicate Information (identified by operation id):
---------------------------------------------------
2 - access("OBJECT_ID"=111)
Note
-----
- dynamic sampling used for this statement
TYGER@ORCL>select * from v$object_usage;
INDEX_NAME TABLE_NAME MON USE START_MONITORING
-------------------- -------------------- --- --- -------------------
END_MONITORING
-------------------
TEST_MONITOR_IDX TEST_MONITOR YES YES 03/28/2014 16:22:46 // MONITORING 为 'YES' 代表已经监控
// USAGE 为 ’YES‘ 代表索引已经被使用
Execution Plan
----------------------------------------------------------
ERROR:
ORA-01039: insufficient privileges on underlying objects of the view
SP2-0612: Error generating AUTOTRACE EXPLAIN report
TYGER@ORCL>set autotrace off;
TYGER@ORCL>