首页 > Linux操作系统 > Linux操作系统 > 043-189


原创 Linux操作系统 作者:jbymy2000 时间:2012-03-10 11:30:18 0 删除 编辑
189: You have many users complaining about slow inserts into a large table.
While investigating the reason,you find that the number of indexes on the
table is high. You want to find out which indexes are not being used.
Which method would you follow to achieve this?
A.enable index monitoring and query the DBA_OBJECTS view
B.enable index monitoring and query the DBA_INDEXES view
C.enable index monitoring and query the V$OBJECT_USAGE view
D.enable index monitoring and view the DBA_INDEXTYPE_COMMENTS view
Answer: C
1: $object_usage可以用来监控系统中索引的使用情况
2: 监控索引的使用:SQL> alter index index_test_pk monitoring usage;
3: SQL> select * from v$object_usage;
4: $object_usage只包括当前用户的索引使用记录,如果需要查出所有用户的索
SQL> select owner, index_name, table_name,
decode(bitand(i.flags, 65536), 0, 'NO', 'YES') monitoring,
decode(bitand(ou.flags, 1), 0, 'NO', 'YES') used,ou.start_monitoring
start_monitoring,ou.end_monitoring end_monitoring
from sys.user$ u, sys.obj$ io, sys.obj$ t, sys.ind$ i, sys.object_usage
ou where i.obj# = ou.obj# and io.obj# = ou.obj# and t.obj# =
and u.user# = io.owner#;
5: 取消对索引的监控
SQL> alter index index_test_pk nomonitoring usage;

来自 “ ITPUB博客 ” ,链接:,如需转载,请注明出处,否则将追究法律责任。

上一篇: 043-188
下一篇: 043-205
请登录后发表评论 登录


  • 博文量
  • 访问量