1)grant CREATE ANY OUTLINE to scott; (sys) 2)exec DBMS_OUTLN_EDIT.CREATE_EDIT_TABLES;(scott) 3)alter session set CREATE_STORED_OUTLINES =aaa ; 4)alter session set USE_STORED_OUTLINES=aaa; 5)create or replace OUTLINE test3_ename FOR CATEGORY aaa ON select * from test3 where ename='SMITH';
6)select * from test3 where ename='SMITH';(注意此时ename列没有索引) 7)create index test3_ename on test3(ENAME); 8)select * from test3 where ename='SMITH';(注意此时ename列有索引,但是执行计划仍然没有使用索引)