| Profilo di haiOracle & StarcraftBlogElenchi | Guida |
|
25 settembre autotrace,explain plan与绑定变量create table fenbu as select 1 id,'Y' flag from dba_objects where rownum<100001; insert into fenbu values(1,'N'); create index IDX_FENBU_FLAG on fenbu(flag); analyze table fenbu compute statistics for table for all columns for all indexes; var a varchar2(32); SQL 10G>set autotrace trace exp; SQL 10G>alter session set events'10046 trace name context forever,level 12'; Session altered. SQL 10G>select * from fenbu where flag=:a;
---------------------------------------------------------------- Predicate Information (identified by operation id): 1 - filter("FLAG"=:A) Note
Session altered.
很显然可以看到set autotrace的执行计划是错的,这是因为set auotrace,explain plan等操作
Misses in library cache during parse: 1 Rows Row Source Operation Commenti (10)Per aggiungere un commento, accedi con il tuo Windows Live ID (se utilizzi Hotmail, Messenger o Xbox LIVE possiedi già un Windows Live ID). Accedi Non hai ancora un Windows Live ID? Registrati
RiferimentiL'URL di riferimento per questo intervento è: http://wzwanghai.spaces.live.com/blog/cns!56626E237AFBD116!340.trak Blog che fanno riferimento a questo intervento
|
|
|