1.表:CREATE TABLE T(ID NUMBER(10) PRIMARY KEY, TITLE VARCHAR2(20), CONTENT CLOB);
2.插入记录略
3.语法分析器
begin ctx_ddl.CREATE_preference('t_lexer','chinese_lexer'); end;
4.多字段联合索引设置
Connected as ctxsys:
begin ctx_ddl.CREATE_preference('tmds', 'MULTI_COLUMN_DATASTORE');end;
begin ctx_ddl.set_attribute('tmds', 'columns', 'title, content');end;
5.建立索引
CREATE index qbss.t_idx on qbss.t(title) indextype is ctxsys.context parameters('datastore ctxsys.tmds lexer t_lexer');请高手指点如何优化

解决方案 »

  1.   

    1,clob数据单独存储,本地管理;
    2,如果经常更新和修改可以设置lob segment;参考lob developer guide
      

  2.   

    select * from t where contains(title,'测试')>0;
    select * from t where contains(title,'测试')>0 and title='aTitle';
    上面2条SQL语句在查询有10万条以上结果集时花的时间相差很大,后面的慢多了,但必须要给定限制条件,如何解决是好?
      

  3.   

    反一下.楼主.
    select * from t where contains(title,'测试')>0 and title='aTitle';
    改为
    select * from t where title='aTitle' and contains(title,'测试')>0;
    估计会比你第一条的还要快上很多.