SQL> alter index aa_index01 monitoring usage;
Index altered
SQL> select * from aa;
ID NAME BORN
---------- -------------------- -----------
1 lishaoqing 2011/10/1
1 lishaoqing 2011/11/1
1 lishaoqing 2011/12/1
1 lishaoqing 2012/1/1
SQL> alter index aa_index01 nomonitoring usage;
Index altered
SQL> select * from v$object_usage where index_name='aa_index01';
INDEX_NAME TABLE_NAME MONITORING USED START_MONITORING END_MONITORING
------------------------------ ------------------------------ ---------- ---- ------------------- -------------------
SQL> select * from v$object_usage where index_name='AA_INDEX01';
INDEX_NAME TABLE_NAME MONITORING USED START_MONITORING END_MONITORING
------------------------------ ------------------------------ ---------- ---- ------------------- -------------------
AA_INDEX01 AA NO NO 02/01/2012 09:21:25 02/01/2012 09:21:42
如果USED列中放的是YES值,表明該查詢被數據庫使用了,若索引在監控周期中被忽略,則該值為NO.
来自 “ ITPUB博客 ” ,链接:http://blog.itpub.net/16381228/viewspace-715395/,如需转载,请注明出处,否则将追究法律责任。
转载于:http://blog.itpub.net/16381228/viewspace-715395/