在select窗口中,执行以下语句: set profiling =1; -- 打开profile分析工具show variables like '%profil%'; -- 查看是否生效show processlist; -- 查看进程use cmc; -- 选择数据库show PROFILE all; -- 全部分析的类型show index from t_log_account; ##查看某个表的索引show index from t_car_copy; ##查看某个表的索引-- 使用ex…
在查看SQL执行计划的时候有很多方式 我常用的方式有三种 SQL> explain plan for 2 select * from scott.emp where ename='KING'; 已解释. 第一种 最常用的 SQL> select * from table(dbms_xplan.display); -------------------------------------------------------------------------- | Id | Operation…
首先构建一个简单的测试用例来实际演示: create table emp as select * from scott.emp; create table dept as select * from scott.dept; create index idx_emp_empno on emp(empno); create index idx_dept_deptno on dept(deptno); 测试过程中查看真实执行计划的方法: set lines 1000 pages 1000 alter…