2007年9月6日 星期四

oracle 9i outline sample

1. select * from armm,armd
where armm.num_armm = armd.num_armm ; 跑88秒

2.select /*+ALL_ROWS */ * from armm,armd
where armm.num_armm = armd.num_armm ; 跑60秒

3. 定義outlines 後
create or replace outline my_armm_outline
for category my_category
on
select /*+ALL_ROWS */ * from armm,armd
where armm.num_armm = armd.num_armm;

alter session set use_stored_outlines = my_category;

select * from dba_outlines;
select * from v$sql_plan;

4.直接打select * from armm,armd
where armm.num_armm = armd.num_armm ;跑52秒

沒有留言: