举个栗子:

select * from SCOTT.emp WHERE EMPNO=7369;

方式一:F5,解释计划窗口,查看索引名是否被用

查看索引是否被使用

方式二:

1.执行sql语句

  select * from SCOTT.emp WHERE EMPNO=7369;

2.将表的索引pk_emp纳入监控

  alter index pk_emp monitoring usage;

3.select * from v$object_usage  查看used状态YES/NO,YES即表示有用索引

4.结束监控  alter index pk_emp nomonitoring usage;

方式三:

执行sql语句:explain plan for  select * from SCOTT.emp where empno=7369;

 select * from table(dbms_xplan.display);

查看索引是否被使用

 

相关文章:

  • 2021-12-31
  • 2022-02-24
  • 2022-01-29
  • 2021-12-13
  • 2021-05-17
  • 2021-12-06
猜你喜欢
  • 2022-12-23
  • 2021-04-07
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-11-15
相关资源
相似解决方案