huanhuanlove 发表于 2011-12-22 08:54

oracle full text index 探秘(1)

<DIV>原文链接 <a href="http://www.killdb.com/?p=222" target="_blank">http://www.killdb.com/?p=222</A></DIV>
<DIV>&nbsp;</DIV>
<DIV>$ sqlplus "/as sysdba"</DIV>
<DIV>SQL*Plus: Release 10.2.0.4.0 - Production on Sun Aug 28 17:17:45 2011</DIV>
<DIV>Copyright (c) 1982, 2007, Oracle.&nbsp; All Rights Reserved.</DIV>
<DIV>Connected to an idle instance.</DIV>
<DIV>SQL&gt; startup<BR>ORACLE instance started.</DIV>
<DIV>Total System Global Area&nbsp; 167772160 bytes<BR>Fixed Size&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 1266392 bytes<BR>Variable Size&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 71306536 bytes<BR>Database Buffers&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 92274688 bytes<BR>Redo Buffers&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 2924544 bytes<BR>Database mounted.<BR>Database opened.<BR>SQL&gt; create user text_idx identified by text_idx;</DIV>
<DIV>User created.</DIV>
<DIV>SQL&gt; <BR>SQL&gt; grant resource ,connect,ctxapp to text_idx;</DIV>
<DIV>Grant succeeded.</DIV>
<DIV>SQL&gt; <BR>SQL&gt; GRANT EXECUTE ON CTXSYS.CTX_CLS TO text_idx;<BR>GRANT EXECUTE ON CTXSYS.CTX_DDL TO text_idx;<BR>GRANT EXECUTE ON CTXSYS.CTX_DOC TO text_idx;<BR>GRANT EXECUTE ON CTXSYS.CTX_OUTPUT TO text_idx;<BR>GRANT EXECUTE ON CTXSYS.CTX_QUERY TO text_idx;<BR>GRANT EXECUTE ON CTXSYS.CTX_REPORT TO text_idx;<BR>GRANT EXECUTE ON CTXSYS.CTX_THES TO text_idx;<BR>GRANT EXECUTE ON CTXSYS.CTX_ULEXER TO text_idx;</DIV>
<DIV>Grant succeeded.</DIV>
<DIV>SQL&gt; <BR>Grant succeeded.</DIV>
<DIV>SQL&gt; <BR>Grant succeeded.</DIV>
<DIV>SQL&gt; <BR>Grant succeeded.</DIV>
<DIV>SQL&gt; <BR>Grant succeeded.</DIV>
<DIV>SQL&gt; <BR>Grant succeeded.</DIV>
<DIV>SQL&gt; <BR>Grant succeeded.</DIV>
<DIV>SQL&gt; <BR>Grant succeeded.</DIV>
<DIV>SQL&gt; <BR>SQL&gt; conn text_idx/text_idx<BR>Connected.<BR>SQL&gt; CREATE TABLE docs (id NUMBER PRIMARY KEY, text VARCHAR2(500));</DIV>
<DIV>Table created.<BR>SQL&gt; INSERT INTO docs VALUES(1, 'http://www.itpub.net/thread-1475450-1-1.html');</DIV>
<DIV>1 row created.</DIV>
<DIV>SQL&gt; INSERT INTO docs VALUES(2, 'http://www.yesky.com/285/1942785_1.shtml');<BR>INSERT INTO docs VALUES(3, 'http://www.baidu.com/s?tn=chenly082=4391');</DIV>
<DIV>1 row created.</DIV>
<DIV>SQL&gt; INSERT INTO docs VALUES(4, 'file:///D:/oracle---官方文档/B19306_01/B19306_01/text.102/b14217/quicktour.htmi1008362');&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <BR>1 row created.</DIV>
<DIV>SQL&gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <BR>INSERT INTO docs VALUES(5, 'file:///D:/oracle---官方文档/B19306_01/B19306_01/text.10<BR>1 row created.</DIV>
<DIV>SQL&gt; 2/b14217/acase.htm#g637598');&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <BR>INSERT INTO docs VALUES(6, 'http://database.51cto.com/art/201104/252898.htm');</DIV>
<DIV>1 row created.</DIV>
<DIV>SQL&gt; <BR>1 row created.</DIV>
<DIV>SQL&gt; <BR>SQL&gt; commit;</DIV>
<DIV>Commit complete.</DIV>
<DIV>SQL&gt; select count(*) from docs;</DIV>
<DIV>&nbsp; COUNT(*)<BR>----------<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 6</DIV>
<DIV>SQL&gt; col text for a50<BR>SQL&gt; set lines 120<BR>SQL&gt; SELECT&nbsp; id, text FROM docs WHERE CONTAINS(text, 'baidu', 1) &gt; 0;</DIV>
<DIV>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ID TEXT<BR>---------- --------------------------------------------------<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 3 <a href="http://www.baidu.com/s?tn=chenly082=4391" target="_blank">http://www.baidu.com/s?tn=chenly082=4391</A></DIV>
<DIV>SQL&gt; <BR>SQL&gt; set autot traceonly<BR>SQL&gt; SELECT&nbsp; id, text FROM docs WHERE CONTAINS(text, 'baidu', 1) &gt; 0;</DIV>
<DIV><BR>Execution Plan<BR>----------------------------------------------------------<BR>Plan hash value: 3588628665</DIV>
<DIV>----------------------------------------------------------------------------------------<BR>| Id&nbsp; | Operation&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; | Name&nbsp;&nbsp;&nbsp;&nbsp; | Rows&nbsp; | Bytes | Cost (%CPU)| Time&nbsp;&nbsp;&nbsp;&nbsp; |<BR>----------------------------------------------------------------------------------------<BR>|&nbsp;&nbsp; 0 | SELECT STATEMENT&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; |&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; |&nbsp;&nbsp;&nbsp;&nbsp; 1 |&nbsp;&nbsp; 277 |&nbsp;&nbsp;&nbsp;&nbsp; 4&nbsp;&nbsp; (0)| 00:00:01 |<BR>|&nbsp;&nbsp; 1 |&nbsp; TABLE ACCESS BY INDEX ROWID| DOCS&nbsp;&nbsp;&nbsp;&nbsp; |&nbsp;&nbsp;&nbsp;&nbsp; 1 |&nbsp;&nbsp; 277 |&nbsp;&nbsp;&nbsp;&nbsp; 4&nbsp;&nbsp; (0)| 00:00:01 |<BR>|*&nbsp; 2 |&nbsp;&nbsp; DOMAIN INDEX&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; | IDX_DOCS |&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; |&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; |&nbsp;&nbsp;&nbsp;&nbsp; 4&nbsp;&nbsp; (0)| 00:00:01 |<BR>----------------------------------------------------------------------------------------</DIV>
<DIV>Predicate Information (identified by operation id):<BR>---------------------------------------------------</DIV>
<DIV>&nbsp;&nbsp; 2 - access("CTXSYS"."CONTAINS"("TEXT",'baidu',1)&gt;0)</DIV>
<DIV>Note<BR>-----<BR>&nbsp;&nbsp; - dynamic sampling used for this statement</DIV>
<DIV><BR>Statistics<BR>----------------------------------------------------------<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 11&nbsp; recursive calls<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 0&nbsp; db block gets<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 18&nbsp; consistent gets<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 0&nbsp; physical reads<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 0&nbsp; redo size<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 500&nbsp; bytes sent via SQL*Net to client<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 400&nbsp; bytes received via SQL*Net from client<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 2&nbsp; SQL*Net roundtrips to/from client<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 0&nbsp; sorts (memory)<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 0&nbsp; sorts (disk)<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 1&nbsp; rows processed</DIV>
<DIV><BR>SQL&gt;&nbsp; create sequence seq_docs<BR>&nbsp; 2&nbsp;&nbsp; minvalue 1<BR>&nbsp; 3&nbsp;&nbsp; nomaxvalue<BR>&nbsp; 4&nbsp;&nbsp; start with 7<BR>&nbsp; 5&nbsp;&nbsp; increment by 1<BR>&nbsp; 6&nbsp;&nbsp; nocycle<BR>&nbsp; 7&nbsp;&nbsp; cache 10;</DIV>
<DIV>Sequence created.</DIV>
<DIV>SQL&gt; begin<BR>&nbsp; 2&nbsp; for i in 1..100 loop<BR>&nbsp; 3&nbsp; INSERT INTO docs(id, text) VALUES(seq_docs.NEXTVAL, 'http://www.killdb.com/'); <BR>&nbsp; 4&nbsp; INSERT INTO docs(id, text) VALUES(seq_docs.NEXTVAL, 'http://www.killdb.com/?p=210'); <BR>&nbsp; 5&nbsp; INSERT INTO docs(id, text) VALUES(seq_docs.NEXTVAL, 'http://www.killdb.com/?p=216'); <BR>&nbsp; 6&nbsp; INSERT INTO docs(id, text) VALUES(seq_docs.NEXTVAL, 'http://www.killdb.com/?p=201'); <BR>&nbsp; 7&nbsp; INSERT INTO docs(id, text) VALUES(seq_docs.NEXTVAL, 'http://www.killdb.com/?p=196'); <BR>&nbsp; 8&nbsp; INSERT INTO docs(id, text) VALUES(seq_docs.NEXTVAL, 'http://www.killdb.com/?p=219'); <BR>&nbsp; 9&nbsp; commit;<BR>&nbsp;10&nbsp; end loop;<BR>&nbsp;11&nbsp; end;<BR>&nbsp;12&nbsp; /</DIV>
<DIV>PL/SQL procedure successfully completed.</DIV>
<DIV>SQL&gt; <BR>SQL&gt; <BR>SQL&gt; select count(*) from docs;</DIV>
<DIV>&nbsp; COUNT(*)<BR>----------<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 606</DIV>
<DIV>SQL&gt; begin<BR>&nbsp; 2&nbsp; for i in 1..1000 loop<BR>&nbsp; 3&nbsp; INSERT INTO docs(id, text) VALUES(seq_docs.NEXTVAL, 'http://www.killdb.com/'); <BR>&nbsp; 4&nbsp; INSERT INTO docs(id, text) VALUES(seq_docs.NEXTVAL, 'http://www.killdb.com/?p=210'); <BR>&nbsp; 5&nbsp; INSERT INTO docs(id, text) VALUES(seq_docs.NEXTVAL, 'http://www.killdb.com/?p=216'); <BR>&nbsp; 6&nbsp; INSERT INTO docs(id, text) VALUES(seq_docs.NEXTVAL, 'http://www.killdb.com/?p=201'); <BR>&nbsp; 7&nbsp; INSERT INTO docs(id, text) VALUES(seq_docs.NEXTVAL, 'http://www.killdb.com/?p=196'); <BR>&nbsp; 8&nbsp; INSERT INTO docs(id, text) VALUES(seq_docs.NEXTVAL, 'http://www.killdb.com/?p=219'); <BR>&nbsp; 9&nbsp; INSERT INTO docs(id, text) VALUES(seq_docs.NEXTVAL, 'http://www.killdb.com/?p=205'); <BR>&nbsp;10&nbsp; INSERT INTO docs(id, text) VALUES(seq_docs.NEXTVAL, 'http://www.killdb.com/?p=206'); <BR>&nbsp;11&nbsp; INSERT INTO docs(id, text) VALUES(seq_docs.NEXTVAL, 'http://www.killdb.com/?p=207'); <BR>&nbsp;12&nbsp; INSERT INTO docs(id, text) VALUES(seq_docs.NEXTVAL, 'http://www.killdb.com/?p=199'); <BR>&nbsp;13&nbsp; INSERT INTO docs(id, text) VALUES(seq_docs.NEXTVAL, 'http://www.killdb.com/?p=208'); <BR>&nbsp;14&nbsp; commit;<BR>&nbsp;15&nbsp; end loop;<BR>&nbsp;16&nbsp; end;<BR>&nbsp;17&nbsp; /</DIV>
<DIV>PL/SQL procedure successfully completed.</DIV>
<DIV>SQL&gt; <BR>SQL&gt; select count(*) from docs;</DIV>
<DIV>&nbsp; COUNT(*)<BR>----------<BR>&nbsp;&nbsp;&nbsp;&nbsp; 11606</DIV>
<DIV>SQL&gt; <BR>SQL&gt; set timing on<BR>SQL&gt; begin<BR>&nbsp; 2&nbsp; for i in 1..10000 loop<BR>&nbsp; 3&nbsp; INSERT INTO docs(id, text) VALUES(seq_docs.NEXTVAL, 'http://www.killdb.com/'); <BR>&nbsp; 4&nbsp; INSERT INTO docs(id, text) VALUES(seq_docs.NEXTVAL, 'http://www.killdb.com/?p=210'); <BR>&nbsp; 5&nbsp; INSERT INTO docs(id, text) VALUES(seq_docs.NEXTVAL, 'http://www.killdb.com/?p=216'); <BR>&nbsp; 6&nbsp; INSERT INTO docs(id, text) VALUES(seq_docs.NEXTVAL, 'http://www.killdb.com/?p=201'); <BR>&nbsp; 7&nbsp; INSERT INTO docs(id, text) VALUES(seq_docs.NEXTVAL, 'http://www.killdb.com/?p=196'); <BR>&nbsp; 8&nbsp; INSERT INTO docs(id, text) VALUES(seq_docs.NEXTVAL, 'http://www.killdb.com/?p=219'); <BR>&nbsp; 9&nbsp; INSERT INTO docs(id, text) VALUES(seq_docs.NEXTVAL, 'http://www.killdb.com/?p=205'); <BR>&nbsp;10&nbsp; INSERT INTO docs(id, text) VALUES(seq_docs.NEXTVAL, 'http://www.killdb.com/?p=206'); <BR>&nbsp;11&nbsp; INSERT INTO docs(id, text) VALUES(seq_docs.NEXTVAL, 'http://www.killdb.com/?p=207'); <BR>&nbsp;12&nbsp; INSERT INTO docs(id, text) VALUES(seq_docs.NEXTVAL, 'http://www.killdb.com/?p=199'); <BR>&nbsp;13&nbsp; INSERT INTO docs(id, text) VALUES(seq_docs.NEXTVAL, 'http://www.killdb.com/?p=208'); <BR>&nbsp;14&nbsp; commit;<BR>&nbsp;15&nbsp; end loop;<BR>&nbsp;16&nbsp; end;<BR>&nbsp;17&nbsp; /</DIV>
<DIV>PL/SQL procedure successfully completed.</DIV>
<DIV>Elapsed: 00:03:43.23<BR>SQL&gt; <BR>SQL&gt; select count(*) from docs;</DIV>
<DIV>&nbsp; COUNT(*)<BR>----------<BR>&nbsp;&nbsp;&nbsp; 121606</DIV>
<DIV>Elapsed: 00:00:00.05<BR>SQL&gt; <BR>SQL&gt; select count(*) from docs where CONTAINS(text,'p=210') &gt; 0;</DIV>
<DIV>&nbsp; COUNT(*)<BR>----------<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 0</DIV>
<DIV>SQL&gt; select count(*) from docs where CONTAINS(text,'killdb') &gt;0;</DIV>
<DIV>&nbsp; COUNT(*)<BR>----------<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 0</DIV>
<DIV>SQL&gt; EXEC CTX_DDL.SYNC_INDEX('idx_docs', '5m');</DIV>
<DIV>PL/SQL procedure successfully completed.</DIV>
<DIV>SQL&gt; select count(*) from docs where CONTAINS(text,'p=210') &gt; 0;</DIV>
<DIV>&nbsp; COUNT(*)<BR>----------<BR>&nbsp;&nbsp;&nbsp; 110500</DIV>
<DIV>SQL&gt; <BR>SQL&gt; SELECT&nbsp; count(*) FROM docs WHERE CONTAINS(text,'killdb') &gt; 0;</DIV>
<DIV>&nbsp; COUNT(*)<BR>----------<BR>&nbsp;&nbsp;&nbsp; 121600</DIV>
<DIV>从这里看出 同步index的重要性了,下面来创建job 来进行定期的同步index以及优化。<BR>SQL&gt; create or replace procedure sync_idx_docs as&nbsp;&nbsp; <BR>&nbsp; 2&nbsp;&nbsp; begin&nbsp;&nbsp; <BR>&nbsp; 3&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ctx_ddl.sync_index('idx_docs');&nbsp;&nbsp; <BR>&nbsp; 4&nbsp;&nbsp; end;&nbsp;&nbsp; <BR>&nbsp; 5&nbsp;&nbsp; /</DIV>
<DIV>Procedure created.</DIV>
<DIV>SQL&gt; VARIABLE job_no number;&nbsp;&nbsp; <BR>SQL&gt;&nbsp; BEGIN&nbsp;&nbsp; <BR>&nbsp; 2&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; DBMS_JOB.SUBMIT(:job_no,'sync_idx_docs();',&nbsp;&nbsp; <BR>&nbsp; 3&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; SYSDATE, 'SYSDATE + 1');&nbsp;&nbsp; <BR>&nbsp; 4&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; commit;&nbsp;&nbsp; <BR>&nbsp; 5&nbsp;&nbsp; END;&nbsp;&nbsp; <BR>&nbsp; 6&nbsp;&nbsp; / </DIV>
<DIV>PL/SQL procedure successfully completed.</DIV>
<DIV>SQL&gt; create or replace procedure optimize_idx_docs as&nbsp;&nbsp; <BR>&nbsp; 2&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; begin&nbsp;&nbsp; <BR>&nbsp; 3&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ctx_ddl.optimize_index('idx_docs','FULL');&nbsp;&nbsp; <BR>&nbsp; 4&nbsp; end;&nbsp;&nbsp; <BR>&nbsp; 5&nbsp; / </DIV>
<DIV>Procedure created.</DIV>
<DIV>SQL&gt; VARIABLE job_no number;&nbsp;&nbsp; <BR>SQL&gt; BEGIN&nbsp;&nbsp; <BR>&nbsp; 2&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; DBMS_JOB.SUBMIT(:job_no,'optimize_idx_docs();',&nbsp;&nbsp; <BR>&nbsp; 3&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; SYSDATE, 'SYSDATE + 1');&nbsp;&nbsp; <BR>&nbsp; 4&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; commit;&nbsp;&nbsp; <BR>&nbsp; 5&nbsp; END;&nbsp;&nbsp; <BR>&nbsp; 6&nbsp; /&nbsp; </DIV>
<DIV>PL/SQL procedure successfully completed.</DIV>
<DIV>SQL&gt; <BR>SQL&gt; col INTERVAL for a25<BR>SQL&gt; select JOB,LOG_USER,SCHEMA_USER,INTERVAL,LAST_DATE from user_jobs;</DIV>
<DIV>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; JOB LOG_USER&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; SCHEMA_USER&nbsp;&nbsp;&nbsp;&nbsp; INTERVAL&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; LAST_DATE<BR>---------- ------------- --------------- ---------------- ---------<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 21 TEXT_IDX&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; TEXT_IDX&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; SYSDATE + 1&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 28-AUG-11<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 22 TEXT_IDX&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; TEXT_IDX&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; SYSDATE + 1&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 28-AUG-11</DIV>
<DIV><BR>---启动如上2个job任务<BR>SQL&gt; execute&nbsp; dbms_job.run(21);&nbsp; <BR>execute&nbsp; dbms_job.run(22); <BR>PL/SQL procedure successfully completed.</DIV>
<DIV>SQL&gt; </DIV>
<DIV>PL/SQL procedure successfully completed.</DIV>
<DIV>SQL&gt; <BR>SQL&gt; alter table docs add owner varchar2(10);</DIV>
<DIV>Table altered.</DIV>
<DIV>SQL&gt; update docs set owner='Roger';</DIV>
<DIV>121606 rows updated.</DIV>
<DIV>SQL&gt; commit;</DIV>
<DIV>Commit complete.</DIV>
<DIV>SQL&gt; </DIV>
<DIV>下面来测试,如果表docs dml操作比较频繁,那么对于select语句来说,是否有较大的影响?</DIV>
<DIV>SQL&gt; select /*+ no_index(docs SYS_C005195)*/<BR>&nbsp; 2&nbsp;&nbsp; count(*)<BR>&nbsp; 3&nbsp;&nbsp;&nbsp; from docs<BR>&nbsp; 4&nbsp;&nbsp; where contains(text, 'p=199') &gt; 0<BR>&nbsp; 5&nbsp;&nbsp;&nbsp;&nbsp; and id &gt; 10500<BR>&nbsp; 6&nbsp;&nbsp;&nbsp;&nbsp; and id &lt; 10800;<BR>Elapsed: 00:00:00.09</DIV>
<DIV>Execution Plan<BR>----------------------------------------------------------<BR>Plan hash value: 1092983528</DIV>
<DIV>-----------------------------------------------------------------------------------------<BR>| Id&nbsp; | Operation&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; | Name&nbsp;&nbsp;&nbsp;&nbsp; | Rows&nbsp; | Bytes | Cost (%CPU)| Time&nbsp;&nbsp;&nbsp;&nbsp; |<BR>-----------------------------------------------------------------------------------------<BR>|&nbsp;&nbsp; 0 | SELECT STATEMENT&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; |&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; |&nbsp;&nbsp;&nbsp;&nbsp; 1 |&nbsp;&nbsp; 277 |&nbsp;&nbsp;&nbsp;&nbsp; 4&nbsp;&nbsp; (0)| 00:00:01 |<BR>|&nbsp;&nbsp; 1 |&nbsp; SORT AGGREGATE&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; |&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; |&nbsp;&nbsp;&nbsp;&nbsp; 1 |&nbsp;&nbsp; 277 |&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; |&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; |<BR>|*&nbsp; 2 |&nbsp;&nbsp; TABLE ACCESS BY INDEX ROWID| DOCS&nbsp;&nbsp;&nbsp;&nbsp; |&nbsp;&nbsp;&nbsp;&nbsp; 1 |&nbsp;&nbsp; 277 |&nbsp;&nbsp;&nbsp;&nbsp; 4&nbsp;&nbsp; (0)| 00:00:01 |<BR>|*&nbsp; 3 |&nbsp;&nbsp;&nbsp; DOMAIN INDEX&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; | IDX_DOCS |&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; |&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; |&nbsp;&nbsp;&nbsp;&nbsp; 4&nbsp;&nbsp; (0)| 00:00:01 |<BR>-----------------------------------------------------------------------------------------</DIV>
<DIV>Predicate Information (identified by operation id):<BR>---------------------------------------------------</DIV>
<DIV>&nbsp;&nbsp; 2 - filter("ID"&gt;10500 AND "ID"&lt;10800)<BR>&nbsp;&nbsp; 3 - access("CTXSYS"."CONTAINS"("TEXT",'p=199')&gt;0)</DIV>
<DIV>Note<BR>-----<BR>&nbsp;&nbsp; - dynamic sampling used for this statement</DIV>
<DIV><BR>---session 1<BR>SQL&gt; show user<BR>USER is "TEXT_IDX"<BR>SQL&gt; begin<BR>&nbsp; 2&nbsp;&nbsp;&nbsp; for i in 1 .. 15000 loop<BR>&nbsp; 3&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; if mod(i, 2) = 0 then<BR>&nbsp; 4&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; update docs<BR>&nbsp; 5&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; set owner = 'killdb'<BR>&nbsp; 6&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; where id = i<BR>&nbsp; 7&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; and id &gt; 10000<BR>&nbsp; 8&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; and id &lt; 15000;<BR>&nbsp; 9&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; commit;<BR>&nbsp;10&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; end if;<BR>&nbsp;11&nbsp;&nbsp;&nbsp; end loop;<BR>&nbsp;12&nbsp;&nbsp;&nbsp; commit;<BR>&nbsp;13&nbsp; end;<BR>&nbsp;14&nbsp; /</DIV>
<DIV>PL/SQL procedure successfully completed.</DIV>
<DIV>---session 2<BR>SQL&gt; select /*+ no_index(docs SYS_C005195)*/<BR>&nbsp; 2&nbsp;&nbsp; id,owner,text<BR>&nbsp; 3&nbsp;&nbsp;&nbsp; from docs<BR>&nbsp; 4&nbsp;&nbsp; where contains(text, 'p=199') &gt; 0<BR>&nbsp; 5&nbsp;&nbsp;&nbsp;&nbsp; and id &gt; 10700<BR>&nbsp; 6&nbsp;&nbsp;&nbsp;&nbsp; and id &lt; 10800;</DIV>
<DIV>90 rows selected.</DIV>
<DIV>Elapsed: 00:00:00.19</DIV>
<DIV>Statistics<BR>----------------------------------------------------------<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 13&nbsp; recursive calls<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 0&nbsp; db block gets<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 17447&nbsp; consistent gets<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 0&nbsp; physical reads<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 1024&nbsp; redo size<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 4691&nbsp; bytes sent via SQL*Net to client<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 455&nbsp; bytes received via SQL*Net from client<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 7&nbsp; SQL*Net roundtrips to/from client<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 0&nbsp; sorts (memory)<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 0&nbsp; sorts (disk)<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 90&nbsp; rows processed</DIV>
<DIV>SQL&gt; /</DIV>
<DIV>90 rows selected.</DIV>
<DIV>Elapsed: 00:00:00.35</DIV>
<DIV>Statistics<BR>----------------------------------------------------------<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 13&nbsp; recursive calls<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 0&nbsp; db block gets<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 21322&nbsp; consistent gets<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 0&nbsp; physical reads<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 0&nbsp; redo size<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 4689&nbsp; bytes sent via SQL*Net to client<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 455&nbsp; bytes received via SQL*Net from client<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 7&nbsp; SQL*Net roundtrips to/from client<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 0&nbsp; sorts (memory)<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 0&nbsp; sorts (disk)<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 90&nbsp; rows processed</DIV>
<DIV>SQL&gt; /</DIV>
<DIV>/90 rows selected.</DIV>
<DIV>Elapsed: 00:00:00.76</DIV>
<DIV>Statistics<BR>----------------------------------------------------------<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 13&nbsp; recursive calls<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 0&nbsp; db block gets<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 19518&nbsp; consistent gets<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 0&nbsp; physical reads<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 1856&nbsp; redo size<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 4689&nbsp; bytes sent via SQL*Net to client<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 455&nbsp; bytes received via SQL*Net from client<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 7&nbsp; SQL*Net roundtrips to/from client<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 0&nbsp; sorts (memory)<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 0&nbsp; sorts (disk)<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 90&nbsp; rows processed</DIV>
<DIV>SQL&gt; </DIV>
<DIV>90 rows selected.</DIV>
<DIV>Elapsed: 00:00:00.37</DIV>
<DIV>Statistics<BR>----------------------------------------------------------<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 13&nbsp; recursive calls<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 0&nbsp; db block gets<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 15409&nbsp; consistent gets<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 0&nbsp; physical reads<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 0&nbsp; redo size<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 4689&nbsp; bytes sent via SQL*Net to client<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 455&nbsp; bytes received via SQL*Net from client<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 7&nbsp; SQL*Net roundtrips to/from client<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 0&nbsp; sorts (memory)<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 0&nbsp; sorts (disk)<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 90&nbsp; rows processed</DIV>
<DIV>SQL&gt; /</DIV>
<DIV>90 rows selected.</DIV>
<DIV>Elapsed: 00:00:00.30</DIV>
<DIV>Statistics<BR>----------------------------------------------------------<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 13&nbsp; recursive calls<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 0&nbsp; db block gets<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 20226&nbsp; consistent gets<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 0&nbsp; physical reads<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 64&nbsp; redo size<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 4689&nbsp; bytes sent via SQL*Net to client<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 455&nbsp; bytes received via SQL*Net from client<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 7&nbsp; SQL*Net roundtrips to/from client<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 0&nbsp; sorts (memory)<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 0&nbsp; sorts (disk)<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 90&nbsp; rows processed</DIV>
<DIV>SQL&gt; /</DIV>
<DIV>90 rows selected.</DIV>
<DIV>Elapsed: 00:00:00.32</DIV>
<DIV>Statistics<BR>----------------------------------------------------------<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 13&nbsp; recursive calls<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 0&nbsp; db block gets<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 17881&nbsp; consistent gets<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 0&nbsp; physical reads<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 0&nbsp; redo size<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 4689&nbsp; bytes sent via SQL*Net to client<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 455&nbsp; bytes received via SQL*Net from client<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 7&nbsp; SQL*Net roundtrips to/from client<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 0&nbsp; sorts (memory)<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 0&nbsp; sorts (disk)<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 90&nbsp; rows processed</DIV>
<DIV>SQL&gt; /</DIV>
<DIV>90 rows selected.</DIV>
<DIV>Elapsed: 00:00:00.42</DIV>
<DIV>Statistics<BR>----------------------------------------------------------<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 13&nbsp; recursive calls<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 0&nbsp; db block gets<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 15728&nbsp; consistent gets<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 0&nbsp; physical reads<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 0&nbsp; redo size<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 4689&nbsp; bytes sent via SQL*Net to client<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 455&nbsp; bytes received via SQL*Net from client<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 7&nbsp; SQL*Net roundtrips to/from client<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 0&nbsp; sorts (memory)<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 0&nbsp; sorts (disk)<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 90&nbsp; rows processed</DIV>
<DIV>SQL&gt; /</DIV>
<DIV>90 rows selected.</DIV>
<DIV>Elapsed: 00:00:00.49</DIV>
<DIV>Statistics<BR>----------------------------------------------------------<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 13&nbsp; recursive calls<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 0&nbsp; db block gets<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 17406&nbsp; consistent gets<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 0&nbsp; physical reads<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 0&nbsp; redo size<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 4689&nbsp; bytes sent via SQL*Net to client<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 455&nbsp; bytes received via SQL*Net from client<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 7&nbsp; SQL*Net roundtrips to/from client<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 0&nbsp; sorts (memory)<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 0&nbsp; sorts (disk)<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 90&nbsp; rows processed</DIV>
<DIV>SQL&gt; /</DIV>
<DIV>90 rows selected.</DIV>
<DIV>Elapsed: 00:00:00.25</DIV>
<DIV>Statistics<BR>----------------------------------------------------------<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 13&nbsp; recursive calls<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 0&nbsp; db block gets<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 16768&nbsp; consistent gets<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 0&nbsp; physical reads<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 128&nbsp; redo size<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 4689&nbsp; bytes sent via SQL*Net to client<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 455&nbsp; bytes received via SQL*Net from client<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 7&nbsp; SQL*Net roundtrips to/from client<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 0&nbsp; sorts (memory)<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 0&nbsp; sorts (disk)<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 90&nbsp; rows processed</DIV>
<DIV>SQL&gt; /</DIV>
<DIV>90 rows selected.</DIV>
<DIV>Elapsed: 00:00:00.40</DIV>
<DIV>Statistics<BR>----------------------------------------------------------<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 13&nbsp; recursive calls<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 0&nbsp; db block gets<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 16515&nbsp; consistent gets<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 0&nbsp; physical reads<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 0&nbsp; redo size<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 4689&nbsp; bytes sent via SQL*Net to client<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 455&nbsp; bytes received via SQL*Net from client<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 7&nbsp; SQL*Net roundtrips to/from client<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 0&nbsp; sorts (memory)<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 0&nbsp; sorts (disk)<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 90&nbsp; rows processed</DIV>
<DIV>SQL&gt; /</DIV>
<DIV>90 rows selected.</DIV>
<DIV>Elapsed: 00:00:00.34</DIV>
<DIV>Statistics<BR>----------------------------------------------------------<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 13&nbsp; recursive calls<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 0&nbsp; db block gets<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 16046&nbsp; consistent gets<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 0&nbsp; physical reads<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 0&nbsp; redo size<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 4689&nbsp; bytes sent via SQL*Net to client<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 455&nbsp; bytes received via SQL*Net from client<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 7&nbsp; SQL*Net roundtrips to/from client<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 0&nbsp; sorts (memory)<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 0&nbsp; sorts (disk)<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 90&nbsp; rows processed</DIV>
<DIV>SQL&gt; /</DIV>
<DIV>90 rows selected.</DIV>
<DIV>Elapsed: 00:00:00.34</DIV>
<DIV>Statistics<BR>----------------------------------------------------------<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 13&nbsp; recursive calls<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 0&nbsp; db block gets<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 19300&nbsp; consistent gets<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 0&nbsp; physical reads<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 1856&nbsp; redo size<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 4689&nbsp; bytes sent via SQL*Net to client<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 455&nbsp; bytes received via SQL*Net from client<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 7&nbsp; SQL*Net roundtrips to/from client<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 0&nbsp; sorts (memory)<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 0&nbsp; sorts (disk)<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 90&nbsp; rows processed</DIV>
<DIV>SQL&gt; /</DIV>
<DIV>90 rows selected.</DIV>
<DIV>Elapsed: 00:00:02.92</DIV>
<DIV>Statistics<BR>----------------------------------------------------------<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 13&nbsp; recursive calls<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 0&nbsp; db block gets<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 19860&nbsp; consistent gets<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 0&nbsp; physical reads<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 1216&nbsp; redo size<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 4689&nbsp; bytes sent via SQL*Net to client<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 455&nbsp; bytes received via SQL*Net from client<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 7&nbsp; SQL*Net roundtrips to/from client<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 0&nbsp; sorts (memory)<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 0&nbsp; sorts (disk)<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 90&nbsp; rows processed</DIV>
<DIV>SQL&gt; /</DIV>
<DIV>90 rows selected.</DIV>
<DIV>Elapsed: 00:00:00.45</DIV>
<DIV>Statistics<BR>----------------------------------------------------------<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 13&nbsp; recursive calls<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 0&nbsp; db block gets<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 15569&nbsp; consistent gets<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 0&nbsp; physical reads<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 0&nbsp; redo size<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 4689&nbsp; bytes sent via SQL*Net to client<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 455&nbsp; bytes received via SQL*Net from client<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 7&nbsp; SQL*Net roundtrips to/from client<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 0&nbsp; sorts (memory)<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 0&nbsp; sorts (disk)<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 90&nbsp; rows processed</DIV>
<DIV>SQL&gt; /</DIV>
<DIV>90 rows selected.</DIV>
<DIV>Elapsed: 00:00:00.42</DIV>
<DIV>Statistics<BR>----------------------------------------------------------<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 13&nbsp; recursive calls<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 0&nbsp; db block gets<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 15120&nbsp; consistent gets<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 0&nbsp; physical reads<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 0&nbsp; redo size<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 4689&nbsp; bytes sent via SQL*Net to client<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 455&nbsp; bytes received via SQL*Net from client<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 7&nbsp; SQL*Net roundtrips to/from client<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 0&nbsp; sorts (memory)<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 0&nbsp; sorts (disk)<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 90&nbsp; rows processed</DIV>
<DIV>SQL&gt; /</DIV>
<DIV>90 rows selected.</DIV>
<DIV>Elapsed: 00:00:00.21</DIV>
<DIV>Statistics<BR>----------------------------------------------------------<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 13&nbsp; recursive calls<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 0&nbsp; db block gets<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 17201&nbsp; consistent gets<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 0&nbsp; physical reads<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 0&nbsp; redo size<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 4689&nbsp; bytes sent via SQL*Net to client<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 455&nbsp; bytes received via SQL*Net from client<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 7&nbsp; SQL*Net roundtrips to/from client<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 0&nbsp; sorts (memory)<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 0&nbsp; sorts (disk)<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 90&nbsp; rows processed</DIV>
<DIV>SQL&gt; /</DIV>
<DIV>90 rows selected.</DIV>
<DIV>Elapsed: 00:00:00.14</DIV>
<DIV>Statistics<BR>----------------------------------------------------------<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 13&nbsp; recursive calls<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 0&nbsp; db block gets<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 18365&nbsp; consistent gets<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 0&nbsp; physical reads<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 384&nbsp; redo size<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 4689&nbsp; bytes sent via SQL*Net to client<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 455&nbsp; bytes received via SQL*Net from client<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 7&nbsp; SQL*Net roundtrips to/from client<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 0&nbsp; sorts (memory)<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 0&nbsp; sorts (disk)<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 90&nbsp; rows processed</DIV>
<DIV>SQL&gt; /</DIV>
<DIV>90 rows selected.</DIV>
<DIV>Elapsed: 00:00:00.59</DIV>
<DIV>Statistics<BR>----------------------------------------------------------<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 13&nbsp; recursive calls<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 0&nbsp; db block gets<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 17998&nbsp; consistent gets<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 0&nbsp; physical reads<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 0&nbsp; redo size<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 4689&nbsp; bytes sent via SQL*Net to client<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 455&nbsp; bytes received via SQL*Net from client<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 7&nbsp; SQL*Net roundtrips to/from client<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 0&nbsp; sorts (memory)<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 0&nbsp; sorts (disk)<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 90&nbsp; rows processed</DIV>
<DIV>SQL&gt; /</DIV>
<DIV>90 rows selected.</DIV>
<DIV>Elapsed: 00:00:00.29</DIV>
<DIV>Statistics<BR>----------------------------------------------------------<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 13&nbsp; recursive calls<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 0&nbsp; db block gets<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 14515&nbsp; consistent gets<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 0&nbsp; physical reads<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 0&nbsp; redo size<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 4689&nbsp; bytes sent via SQL*Net to client<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 455&nbsp; bytes received via SQL*Net from client<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 7&nbsp; SQL*Net roundtrips to/from client<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 0&nbsp; sorts (memory)<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 0&nbsp; sorts (disk)<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 90&nbsp; rows processed</DIV>
<DIV>SQL&gt; /</DIV>
<DIV>90 rows selected.</DIV>
<DIV>Elapsed: 00:00:00.11</DIV>
<DIV>Statistics<BR>----------------------------------------------------------<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 13&nbsp; recursive calls<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 0&nbsp; db block gets<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 15595&nbsp; consistent gets<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 0&nbsp; physical reads<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 704&nbsp; redo size<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 4689&nbsp; bytes sent via SQL*Net to client<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 455&nbsp; bytes received via SQL*Net from client<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 7&nbsp; SQL*Net roundtrips to/from client<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 0&nbsp; sorts (memory)<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 0&nbsp; sorts (disk)<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 90&nbsp; rows processed</DIV>
<DIV>SQL&gt; /</DIV>
<DIV>90 rows selected.</DIV>
<DIV>Elapsed: 00:00:00.23</DIV>
<DIV>Statistics<BR>----------------------------------------------------------<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 13&nbsp; recursive calls<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 0&nbsp; db block gets<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 15675&nbsp; consistent gets<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 0&nbsp; physical reads<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 768&nbsp; redo size<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 4689&nbsp; bytes sent via SQL*Net to client<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 455&nbsp; bytes received via SQL*Net from client<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 7&nbsp; SQL*Net roundtrips to/from client<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 0&nbsp; sorts (memory)<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 0&nbsp; sorts (disk)<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 90&nbsp; rows processed</DIV>
<DIV>SQL&gt; /</DIV>
<DIV>90 rows selected.</DIV>
<DIV>Elapsed: 00:00:00.20</DIV>
<DIV>Statistics<BR>----------------------------------------------------------<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 13&nbsp; recursive calls<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 0&nbsp; db block gets<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 15584&nbsp; consistent gets<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 0&nbsp; physical reads<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 0&nbsp; redo size<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 4689&nbsp; bytes sent via SQL*Net to client<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 455&nbsp; bytes received via SQL*Net from client<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 7&nbsp; SQL*Net roundtrips to/from client<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 0&nbsp; sorts (memory)<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 0&nbsp; sorts (disk)<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 90&nbsp; rows processed</DIV>
<DIV>SQL&gt; /</DIV>
<DIV>90 rows selected.</DIV>
<DIV>Elapsed: 00:00:00.14</DIV>
<DIV>Statistics<BR>----------------------------------------------------------<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 13&nbsp; recursive calls<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 0&nbsp; db block gets<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 18380&nbsp; consistent gets<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 0&nbsp; physical reads<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 1344&nbsp; redo size<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 4689&nbsp; bytes sent via SQL*Net to client<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 455&nbsp; bytes received via SQL*Net from client<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 7&nbsp; SQL*Net roundtrips to/from client<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 0&nbsp; sorts (memory)<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 0&nbsp; sorts (disk)<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 90&nbsp; rows processed</DIV>
<DIV>SQL&gt; </DIV>
<DIV><BR>从上面的测试不难看出,对于DML操作频繁的话,对全文索引来说,还是有较大的影响的。</DIV>
<DIV><BR>SQL&gt; begin<BR>&nbsp; 2&nbsp;&nbsp;&nbsp; for i in 1 .. 15000 loop<BR>&nbsp; 3&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; if mod(i, 2) = 0 then<BR>&nbsp; 4&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; update docs<BR>&nbsp; 5&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; set owner = 'google'<BR>&nbsp; 6&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; where id = i<BR>&nbsp; 7&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; and id &gt; 50000<BR>&nbsp; 8&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; and id &lt; 10000;<BR>&nbsp; 9&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; commit;<BR>&nbsp;10&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; end if;<BR>&nbsp;11&nbsp;&nbsp;&nbsp; end loop;<BR>&nbsp;12&nbsp;&nbsp;&nbsp; commit;<BR>&nbsp;13&nbsp; end;<BR>&nbsp;14&nbsp; /</DIV>
<DIV>PL/SQL procedure successfully completed.</DIV>
<DIV>Elapsed: 00:00:02.25<BR>SQL&gt; exec ctx_ddl.optimize_index('idx_docs','rebuild') ;</DIV>
<DIV>PL/SQL procedure successfully completed.</DIV>
<DIV>Elapsed: 00:00:02.84<BR>SQL&gt; begin<BR>&nbsp; 2&nbsp;&nbsp;&nbsp; for i in 1 .. 15000 loop<BR>&nbsp; 3&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; if mod(i, 2) = 0 then<BR>&nbsp; 4&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; update docs<BR>&nbsp; 5&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; set owner = 'baidu'<BR>&nbsp; 6&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; where id = i<BR>&nbsp; 7&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; and id &gt; 50000<BR>&nbsp; 8&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; and id &lt; 10000;<BR>&nbsp; 9&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; commit;<BR>&nbsp;10&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; end if;<BR>&nbsp;11&nbsp;&nbsp;&nbsp; end loop;<BR>&nbsp;12&nbsp;&nbsp;&nbsp; commit;<BR>&nbsp;13&nbsp; end;<BR>&nbsp;14&nbsp; /</DIV>
<DIV>PL/SQL procedure successfully completed.</DIV>
<DIV>Elapsed: 00:00:02.23<BR>SQL&gt; exec ctx_ddl.optimize_index('idx_docs','FULL') ; </DIV>
<DIV>PL/SQL procedure successfully completed.</DIV>
<DIV>Elapsed: 00:00:00.45<BR>SQL&gt; </DIV>
<DIV>SQL&gt; begin<BR>&nbsp; 2&nbsp; for i in 1..10000 loop<BR>&nbsp; 3&nbsp; INSERT INTO docs(id, text) VALUES(seq_docs.NEXTVAL, 'http://www.killdb.com/'); <BR>&nbsp; 4&nbsp; INSERT INTO docs(id, text) VALUES(seq_docs.NEXTVAL, 'http://www.killdb.com/?p=210'); <BR>&nbsp; 5&nbsp; INSERT INTO docs(id, text) VALUES(seq_docs.NEXTVAL, 'http://www.killdb.com/?p=216'); <BR>&nbsp; 6&nbsp; INSERT INTO docs(id, text) VALUES(seq_docs.NEXTVAL, 'http://www.killdb.com/?p=201'); <BR>&nbsp; 7&nbsp; INSERT INTO docs(id, text) VALUES(seq_docs.NEXTVAL, 'http://www.killdb.com/?p=196'); <BR>&nbsp; 8&nbsp; INSERT INTO docs(id, text) VALUES(seq_docs.NEXTVAL, 'http://www.killdb.com/?p=219'); <BR>&nbsp; 9&nbsp; INSERT INTO docs(id, text) VALUES(seq_docs.NEXTVAL, 'http://www.killdb.com/?p=205'); <BR>&nbsp;10&nbsp; INSERT INTO docs(id, text) VALUES(seq_docs.NEXTVAL, 'http://www.killdb.com/?p=206'); <BR>&nbsp;11&nbsp; INSERT INTO docs(id, text) VALUES(seq_docs.NEXTVAL, 'http://www.killdb.com/?p=207'); <BR>&nbsp;12&nbsp; INSERT INTO docs(id, text) VALUES(seq_docs.NEXTVAL, 'http://www.killdb.com/?p=199'); <BR>&nbsp;13&nbsp; INSERT INTO docs(id, text) VALUES(seq_docs.NEXTVAL, 'http://www.killdb.com/?p=208'); <BR>&nbsp;14&nbsp; commit;<BR>&nbsp;15&nbsp; end loop;<BR>&nbsp;16&nbsp; end;<BR>&nbsp;17&nbsp; /</DIV>
<DIV>begin<BR>*<BR>ERROR at line 1:<BR>ORA-29875: failed in the execution of the ODCIINDEXINSERT routine<BR>ORA-20000: Oracle Text error:<BR>DRG-50857: oracle error in textindexmethods.ODCIIndexInsert<BR>ORA-00604: error occurred at recursive SQL level 2<BR>ORA-01013: user requested cancel of current operation<BR>ORA-06512: at "CTXSYS.DRUE", line 160<BR>ORA-06512: at "CTXSYS.TEXTINDEXMETHODS", line 633<BR>ORA-06512: at line 13</DIV>
<DIV><BR>Elapsed: 00:01:09.73</DIV>
<DIV>SQL&gt; select count(*) from docs;</DIV>
<DIV>&nbsp; COUNT(*)<BR>----------<BR>&nbsp;&nbsp;&nbsp; 138898</DIV>
<DIV>Elapsed: 00:00:00.35<BR>SQL&gt; exec ctx_ddl.optimize_index('idx_docs','FULL') ;</DIV>
<DIV>PL/SQL procedure successfully completed.</DIV>
<DIV>Elapsed: 00:00:00.48<BR>SQL&gt; begin<BR>&nbsp; 2&nbsp; for i in 1..10000 loop<BR>&nbsp; 3&nbsp; INSERT INTO docs(id, text) VALUES(seq_docs.NEXTVAL, 'http://www.killdb.com/'); <BR>&nbsp; 4&nbsp; INSERT INTO docs(id, text) VALUES(seq_docs.NEXTVAL, 'http://www.killdb.com/?p=210'); <BR>&nbsp; 5&nbsp; INSERT INTO docs(id, text) VALUES(seq_docs.NEXTVAL, 'http://www.killdb.com/?p=216'); <BR>&nbsp; 6&nbsp; INSERT INTO docs(id, text) VALUES(seq_docs.NEXTVAL, 'http://www.killdb.com/?p=201'); <BR>&nbsp; 7&nbsp; INSERT INTO docs(id, text) VALUES(seq_docs.NEXTVAL, 'http://www.killdb.com/?p=196'); <BR>&nbsp; 8&nbsp; INSERT INTO docs(id, text) VALUES(seq_docs.NEXTVAL, 'http://www.killdb.com/?p=219'); <BR>&nbsp; 9&nbsp; INSERT INTO docs(id, text) VALUES(seq_docs.NEXTVAL, 'http://www.killdb.com/?p=205'); <BR>&nbsp;10&nbsp; INSERT INTO docs(id, text) VALUES(seq_docs.NEXTVAL, 'http://www.killdb.com/?p=206'); <BR>&nbsp;11&nbsp; INSERT INTO docs(id, text) VALUES(seq_docs.NEXTVAL, 'http://www.killdb.com/?p=207'); <BR>&nbsp;12&nbsp; INSERT INTO docs(id, text) VALUES(seq_docs.NEXTVAL, 'http://www.killdb.com/?p=199'); <BR>&nbsp;13&nbsp; INSERT INTO docs(id, text) VALUES(seq_docs.NEXTVAL, 'http://www.killdb.com/?p=208'); <BR>&nbsp;14&nbsp; commit;<BR>&nbsp;15&nbsp; end loop;<BR>&nbsp;16&nbsp; end;<BR>&nbsp;17&nbsp; /</DIV>
<DIV>begin<BR>*<BR>ERROR at line 1:<BR>ORA-29875: failed in the execution of the ODCIINDEXINSERT routine<BR>ORA-20000: Oracle Text error:<BR>DRG-50857: oracle error in textindexmethods.ODCIIndexInsert<BR>ORA-01013: user requested cancel of current operation<BR>ORA-06512: at "CTXSYS.DRUE", line 160<BR>ORA-06512: at "CTXSYS.TEXTINDEXMETHODS", line 633<BR>ORA-06512: at line 12</DIV>
<DIV><BR>Elapsed: 00:01:06.17</DIV>
<DIV>SQL&gt; exec ctx_ddl.optimize_index('idx_docs','rebuild') ;</DIV>
<DIV>PL/SQL procedure successfully completed.</DIV>
<DIV>Elapsed: 00:00:02.09<BR>SQL&gt; select count(*) from docs;</DIV>
<DIV>&nbsp; COUNT(*)<BR>----------<BR>&nbsp;&nbsp;&nbsp; 156091</DIV>
<DIV>Elapsed: 00:00:00.01<BR>SQL&gt; <BR>有人说优化index的时候,使用rebuild比full快很多,但是我测试恰恰相反,不知道为啥。</DIV>
<DIV>最后总结下:</DIV>
<DIV>1. DML操作较为频繁表,对全文索引一定影响,但是如果说必须使用该功能,那么也没办法,<BR>2. 至于说为什么有一定影响,其实原理都一样的,因为逻辑读的消耗会增加,必然影响性能。</DIV>
<DIV>该功能是从oracle 9i引入的,10g,11g都分别有一定的改变,下一篇文章将会进行描述。</DIV>
页: [1]
查看完整版本: oracle full text index 探秘(1)