首先构建一个简单的测试用例来实际演示: 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…
也许有很多种方法,这里只是书上学到的一种方法 with a as ( order by grp_factor) t ) select b.id, a.grp_factor )b --use v$sqlarea to find out your query by searching with key words. this might --take a little bit long. select sql_id, sql_text from v$sqlarea where sql_text li…