﻿<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:trackback="http://madskills.com/public/xml/rss/module/trackback/" xmlns:wfw="http://wellformedweb.org/CommentAPI/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/"><channel><title>博客园-天堂的狼-最新评论</title><link>http://www.cnblogs.com/xinyuxin912/CommentsRSS.aspx</link><description>更好的生活，来自不懈的努力与拼搏，不要仅仅看中结果，拼搏的过程同样是精彩的！</description><language>zh-cn</language><pubDate>Fri, 30 Sep 2011 06:16:37 GMT</pubDate><lastBuildDate>Fri, 30 Sep 2011 06:16:37 GMT</lastBuildDate><generator>cnblogs</generator><item><title>Re:【转】oracle全文检索</title><link>http://www.cnblogs.com/xinyuxin912/archive/2011/09/07/2169882.html#2194719</link><dc:creator>天堂的狼</dc:creator><author>天堂的狼</author><pubDate>Wed, 07 Sep 2011 09:24:52 GMT</pubDate><guid>http://www.cnblogs.com/xinyuxin912/archive/2011/09/07/2169882.html#2194719</guid><description><![CDATA[【转】http://monkeybo.blog.sohu.com/29164005.html
1.给你的数据库用户赋权

SQL&gt; grant ctxapp to &lt;用户&gt;;
SQL&gt; grant execute on ctxsys.ctx_ddl to &lt;用户&gt;;


2.建索引

注意：把 &lt;aaa&gt; 换成表空间的名字。最好新建一个，这是用来存放text index (全文检索索引)的
begin
ctx_ddl.create_preference(&#39;your_lexer&#39;,&#39;CHINESE_VGRAM_LEXER&#39;);
ctx_ddl.create_preference(&#39;your_store&#39;,&#39;BASIC_STORAGE&#39;);
ctx_ddl.set_attribute(&#39;your_store&#39;, &#39;I_TABLE_CLAUSE&#39;,
&#39;tablespace &lt;aaa&gt;&#39;);
ctx_ddl.set_attribute(&#39;your_store&#39;, &#39;K_TABLE_CLAUSE&#39;,
&#39;tablespace &lt;aaa&gt;&#39;);
ctx_ddl.set_attribute(&#39;your_store&#39;, &#39;R_TABLE_CLAUSE&#39;,
&#39;tablespace &lt;aaa&gt;&#39;);
ctx_ddl.set_attribute(&#39;your_store&#39;, &#39;N_TABLE_CLAUSE&#39;,
&#39;tablespace &lt;aaa&gt;&#39;);
ctx_ddl.set_attribute(&#39;your_store&#39;, &#39;I_INDEX_CLAUSE&#39;,
&#39;tablespace &lt;aaa&gt;&#39;);
ctx_ddl.set_attribute(&#39;your_store&#39;, &#39;P_TABLE_CLAUSE&#39;,
&#39;tablespace &lt;aaa&gt;&#39;);
end;
/
CREATE INDEX CTX_DEVICE_NOTICE_EVENT
ON DEVICE_NOTICE_EVENT(SOURCE_NAME) INDEXTYPE IS CTXSYS.CONTEXT
PARAMETERS(&#39;LEXER your_lexer
STORAGE your_store
MEMORY 50M&#39;); //如果内存2g的话可改为100M


3.索引同步与优化（注意：text index 与普通索引不同,不是实时的）

SQL&gt;ctxsys.ctx_ddl.sync_index(&#39;CTX_DEVICE_NOTICE_EVENT&#39;,&#39;10M&#39;); //如果内存2g的话可改为100M,用于同步索引,要跟一段时间执行一次,比如15分钟.
SQL&gt;ctxsys.ctx_ddl.optimize_index(&#39;CTX_DEVICE_NOTICE_EVENT&#39;,&#39;FULL&#39;); //用于优化索引,一般一天执行一次就行.

4.查询方法

4.1
select * from DEVICE_NOTICE_EVENT
where contains(SOURCE_NAME,&#39;aaa&#39;)&gt;0
等价于原来的
select * from DEVICE_NOTICE_EVENT
where SOURCE_NAME like &#39;%aaa%&#39;
4.2
select * from DEVICE_NOTICE_EVENT
where contains(SOURCE_NAME,&#39;aaa &amp; bbb&#39;)&gt;0
等价于原来的
select * from DEVICE_NOTICE_EVENT
where SOURCE_NAME like &#39;%aaa%&#39; and SOURCE_NAME like &#39;%bbb%&#39;
4.3
select * from DEVICE_NOTICE_EVENT
where contains(SOURCE_NAME,&#39;aaa | bbb&#39;)&gt;0
等价于原来的
select * from DEVICE_NOTICE_EVENT
where SOURCE_NAME like &#39;%aaa%&#39; or SOURCE_NAME like &#39;%bbb%&#39;<br><br><div align=right><a style="text-decoration:none;" href="http://www.cnblogs.com/xinyuxin912/" target="_blank">天堂的狼</a> 2011-09-07 17:24 <a href="http://www.cnblogs.com/xinyuxin912/archive/2011/09/07/2169882.html#2194719#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>Re:【转】oracle全文检索</title><link>http://www.cnblogs.com/xinyuxin912/archive/2011/09/07/2169882.html#2194580</link><dc:creator>天堂的狼</dc:creator><author>天堂的狼</author><pubDate>Wed, 07 Sep 2011 07:26:32 GMT</pubDate><guid>http://www.cnblogs.com/xinyuxin912/archive/2011/09/07/2169882.html#2194580</guid><description><![CDATA[[img]http://pic002.cnblogs.com/images/2011/13861/2011090715260752.jpg[/img] 遇到这个怎么办？:-(<br><br><div align=right><a style="text-decoration:none;" href="http://www.cnblogs.com/xinyuxin912/" target="_blank">天堂的狼</a> 2011-09-07 15:26 <a href="http://www.cnblogs.com/xinyuxin912/archive/2011/09/07/2169882.html#2194580#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>Re:【转】oracle全文检索</title><link>http://www.cnblogs.com/xinyuxin912/archive/2011/09/07/2169882.html#2194579</link><dc:creator>天堂的狼</dc:creator><author>天堂的狼</author><pubDate>Wed, 07 Sep 2011 07:25:08 GMT</pubDate><guid>http://www.cnblogs.com/xinyuxin912/archive/2011/09/07/2169882.html#2194579</guid><description><![CDATA[准备试试时，才发现，Oracle中创建全文索引，
只能在类型：VARCHAR2, CLOB, BLOB, CHAR, BFILE, XMLType, and URIType上创建；
不能在类型：NCLOB，NVARCHAR2，NCHAR，DATE，NUMBER，TIMESTAMP上创建。  悲催的~<br><br><div align=right><a style="text-decoration:none;" href="http://www.cnblogs.com/xinyuxin912/" target="_blank">天堂的狼</a> 2011-09-07 15:25 <a href="http://www.cnblogs.com/xinyuxin912/archive/2011/09/07/2169882.html#2194579#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>Re:json与xml比较</title><link>http://www.cnblogs.com/xinyuxin912/archive/2011/08/02/1999614.html#2166817</link><dc:creator>天堂的狼</dc:creator><author>天堂的狼</author><pubDate>Tue, 02 Aug 2011 06:23:27 GMT</pubDate><guid>http://www.cnblogs.com/xinyuxin912/archive/2011/08/02/1999614.html#2166817</guid><description><![CDATA[@sofakeer 多谢<br><br><div align=right><a style="text-decoration:none;" href="http://www.cnblogs.com/xinyuxin912/" target="_blank">天堂的狼</a> 2011-08-02 14:23 <a href="http://www.cnblogs.com/xinyuxin912/archive/2011/08/02/1999614.html#2166817#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>Re:json与xml比较</title><link>http://www.cnblogs.com/xinyuxin912/archive/2011/04/29/1999614.html#2083538</link><dc:creator>sofakeer</dc:creator><author>sofakeer</author><pubDate>Fri, 29 Apr 2011 09:09:11 GMT</pubDate><guid>http://www.cnblogs.com/xinyuxin912/archive/2011/04/29/1999614.html#2083538</guid><description><![CDATA[
　	XML	JSON	PB	Lua
数据结构支持	复杂结构	简单结构	较复杂结构	复杂结构
数据保存方式	文本	文本	二进制	文本
数据保存大小	大	一般	小	一般
解析效率	慢	一般	快	稍快
语言支持程度	非常多	多	C++/Java/Python	多
开发难度？繁琐？	繁琐	简单	简单	相对繁琐
学习成本	低	低	低	高
适用范围	数据交换	数据交换	数据交换	数据保存及脚本处理<br><br><div align=right><a style="text-decoration:none;" href="http://www.cnblogs.com/xinyuxin912/" target="_blank">sofakeer</a> 2011-04-29 17:09 <a href="http://www.cnblogs.com/xinyuxin912/archive/2011/04/29/1999614.html#2083538#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>Re:[转]Oracle Data Guard配置手记</title><link>http://www.cnblogs.com/xinyuxin912/archive/2010/12/20/1033200.html#1992497</link><dc:creator>云想天筝</dc:creator><author>云想天筝</author><pubDate>Mon, 20 Dec 2010 08:53:06 GMT</pubDate><guid>http://www.cnblogs.com/xinyuxin912/archive/2010/12/20/1033200.html#1992497</guid><description><![CDATA[请问你所说的主从服务器需要架构相同，如果主服务器用sun sparc的小型机，备份用x86的服务器，但都使用solaris的系统可以吗？<br><br><div align=right><a style="text-decoration:none;" href="http://www.cnblogs.com/xinyuxin912/" target="_blank">云想天筝</a> 2010-12-20 16:53 <a href="http://www.cnblogs.com/xinyuxin912/archive/2010/12/20/1033200.html#1992497#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>Re:[转]在oracle下如何创建database link全面总结</title><link>http://www.cnblogs.com/xinyuxin912/archive/2010/02/10/1032261.html#1763861</link><dc:creator>天堂的狼</dc:creator><author>天堂的狼</author><pubDate>Wed, 10 Feb 2010 02:46:23 GMT</pubDate><guid>http://www.cnblogs.com/xinyuxin912/archive/2010/02/10/1032261.html#1763861</guid><description><![CDATA[--创建 连接
create database link dbLink
connect to fais identified by &quot;7225bb272d857c451096af1c9d5d70&quot;
using 'orcl79';


 --测试 是否正常
 select * from auth_department@dbLink;

--查看连接
select * from dba_db_links;
select owner,object_name from dba_objects where object_type='DATABASE LINK';

--删除连接 
drop database link dbLink;<br><br><div align=right><a style="text-decoration:none;" href="http://www.cnblogs.com/xinyuxin912/" target="_blank">天堂的狼</a> 2010-02-10 10:46 <a href="http://www.cnblogs.com/xinyuxin912/archive/2010/02/10/1032261.html#1763861#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>Re:[转]在oracle下如何创建database link全面总结</title><link>http://www.cnblogs.com/xinyuxin912/archive/2009/12/03/1032261.html#1713528</link><dc:creator>cheap timberland</dc:creator><author>cheap timberland</author><pubDate>Thu, 03 Dec 2009 02:09:52 GMT</pubDate><guid>http://www.cnblogs.com/xinyuxin912/archive/2009/12/03/1032261.html#1713528</guid><description><![CDATA[[url=&quot;http://www.lookshoes.net/&quot;]nike air max[/url]
[url=&quot;http://www.lookshoes.net/&quot;]af1 shoes[/url]
[url=&quot;http://www.lookshoes.net/&quot;]nike jordan[/url]
[url=&quot;http://www.lookshoes.net/&quot;]nike shox[/url]
[url=&quot;http://www.watchesale.org/&quot;]replica rolex watches[/url]
[url=&quot;http://www.watchesale.org/&quot;]rolex watches[/url]
[url=&quot;http://www.watchesale.org/&quot;]discount rolex[/url]
[url=&quot;http://www.dearjewelry.net/&quot;]fashion tiffany jewelry[/url] 
[url=&quot;http://www.dearjewelry.net/&quot;]buy cheap jewelry[/url] 
[url=&quot;http://www.dearjewelry.net/&quot;]designer tiffany jewelry[/url] 
[url=&quot;http://www.dearjewelry.net/&quot;]cheap jewelry[/url] 
<br><br><div align=right><a style="text-decoration:none;" href="http://www.cnblogs.com/xinyuxin912/" target="_blank">cheap timberland</a> 2009-12-03 10:09 <a href="http://www.cnblogs.com/xinyuxin912/archive/2009/12/03/1032261.html#1713528#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>Re:[转]在oracle下如何创建database link全面总结</title><link>http://www.cnblogs.com/xinyuxin912/archive/2009/12/03/1032261.html#1713527</link><dc:creator>cheap timberland</dc:creator><author>cheap timberland</author><pubDate>Thu, 03 Dec 2009 02:09:36 GMT</pubDate><guid>http://www.cnblogs.com/xinyuxin912/archive/2009/12/03/1032261.html#1713527</guid><description><![CDATA[&lt;a href=http://www.myfakewatch.com/&gt;rolex replica watches&lt;/a&gt;
&lt;a href=http://www.myfakewatch.com/&gt;discount watches&lt;/a&gt;
&lt;a href=http://www.myfakewatch.com/&gt;replica fashion watches&lt;/a&gt;
&lt;a href=http://www.myfakewatch.com/&gt;cheap luxury watches&lt;/a&gt;

<br><br><div align=right><a style="text-decoration:none;" href="http://www.cnblogs.com/xinyuxin912/" target="_blank">cheap timberland</a> 2009-12-03 10:09 <a href="http://www.cnblogs.com/xinyuxin912/archive/2009/12/03/1032261.html#1713527#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>Re:[转]Oracle Data Guard配置手记</title><link>http://www.cnblogs.com/xinyuxin912/archive/2009/09/25/1033200.html#1657897</link><dc:creator>abcdf</dc:creator><author>abcdf</author><pubDate>Fri, 25 Sep 2009 06:14:36 GMT</pubDate><guid>http://www.cnblogs.com/xinyuxin912/archive/2009/09/25/1033200.html#1657897</guid><description><![CDATA[好像和别的文章一样不是完整的步骤，而且也没说明白<br><br><div align=right><a style="text-decoration:none;" href="http://www.cnblogs.com/xinyuxin912/" target="_blank">abcdf</a> 2009-09-25 14:14 <a href="http://www.cnblogs.com/xinyuxin912/archive/2009/09/25/1033200.html#1657897#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item></channel></rss>
