易截截图软件、单文件、免安装、纯绿色、仅160KB

oracle全文索引之WORDLIST PREFERENCE

Oracle全文索引的WORDLIST属性用来设置模糊查询和同词根查询,另外WORDLIST属性还支持通配符查询。
Oracle的WORDLIST属性只有BASIC_WORDLIST一种,下面看一个BASIC_WORDLIST的例子:
1.Stemmer attribute是用来查询用词根的数据
SQL> create table stemmer_tbl(id number primary key,docs clob);
Table created.
SQL> insert into stemmer_tbl values(111,'We are testing the Stemmer attribute option');
1 row created.
SQL> insert into stemmer_tbl values(112,'The girl sang like a frog');
1 row created.
SQL> insert into stemmer_tbl values(113,'My import is committing too often');
1 row created.
SQL> commit;
Commit complete.
--
-- Basic WordList Stemmer attribute
-- This example uses English for Stemming.
-- Language choices are: NULL,ENGLISH,DERIVATIONAL,DUTCH,FRENCH,GERMAN,ITALIAN
-- and SPANISH. By default we use the language of the database. If the
-- database is not one of the listed languages then we choose NULL for stemmer
-- and default for fuzzy
--
SQL> begin
2 Ctx_Ddl.Create_Preference('STEMMER_PREF', 'BASIC_WORDLIST');
3 ctx_ddl.set_attribute('STEMMER_PREF','STEMMER','ENGLISH');
4 end;
5 /
PL/SQL procedure successfully completed.
SQL> create index stemmer_idx on stemmer_tbl ( docs )
2 indextype is ctxsys.context
3 parameters ('Wordlist STEMMER_PREF');
Index created.
SQL> column docs format a20
SQL> select id,docs,score(1) from stemmer_tbl
2 where contains ( docs, '$test',1 ) > 0;
ID DOCS SCORE(1)
---------- -------------------- ----------
111 We are testing the S 4
temmer attribute opt
ion
SQL> select id,docs,score(1) from stemmer_tbl
2 where contains ( docs, '$sing',1) >0;
ID DOCS SCORE(1)
---------- -------------------- ----------
112 The girl sang like a 4
frog
第一个查询是查test的找出testing,这个不太明显;第二个是找词根是sing的数据,找到了sang的这一行数据。


相关文档:

oracle 表空间操作

oracle表空间操作详解
  1
  2
  3作者:   来源:    更新日期:2006-01-04 
  5
  6 
  7建立表空间
  8
  9CREATE TABLESPACE data01
 10DATAFILE '/ora ......

ORACLE JOB 汇总

一。job的运行频率设置
1.每天固定时间运行,比如早上8:10分钟:Trunc(Sysdate+1) + (8*60+10)/24*60
2.Toad中提供的:
每天:trunc(sysdate+1)
每周:trunc(sysdate+7)
每月:trunc(sysdate+30)
每个星期日:next_day(trunc(sysdate),'SUNDAY')
每天6点:trunc(sysdate+1)+6/24
半个小时:sysdate+30/1440
3.每个 ......

【转】优化Oracle数据库性能

 【IT168 技术文档】随着网络应用和电子商务的不断发展,各个站点的访问量越来越大,如何使有限的计算机系统资源为更多的用户服务?如何保证用户的响应速度和服务质量?这些问题都属于服务器性能优化的范畴。作为较成功的数据库厂商,Oracle公司数据库的性能优化是如何进行的
   优化策略
   为了保证Oracle数 ......

在oracle利用游标取数据库的结果集应用实例:

SQL> create table test2(s1 varchar(10),s2 varchar2(10));
表已创建。
SQL> insert into test2 values('11','111');
已创建 1 行。
SQL> insert into test2 values('22','222');
已创建 1 行。
SQL> CREATE OR REPLACE PACKAGE test222 AS
2 TYPE t_cursor IS REF CURSOR;
3 procedure p_tes ......
© 2009 ej38.com All Rights Reserved. 关于E健网联系我们 | 站点地图 | 赣ICP备09004571号