锘??xml version="1.0" encoding="utf-8" standalone="yes"?>亚洲欧美自偷自拍另类视,亚洲AV电影天堂男人的天堂,亚洲va成无码人在线观看http://www.tkk7.com/rabbit/瀛︿範絎旇zh-cnSun, 23 Mar 2025 21:06:40 GMTSun, 23 Mar 2025 21:06:40 GMT60tips鎮仠http://www.tkk7.com/rabbit/archive/2014/05/07/413378.htmlRabbitRabbitWed, 07 May 2014 14:23:00 GMThttp://www.tkk7.com/rabbit/archive/2014/05/07/413378.htmlhttp://www.tkk7.com/rabbit/comments/413378.htmlhttp://www.tkk7.com/rabbit/archive/2014/05/07/413378.html#Feedback0http://www.tkk7.com/rabbit/comments/commentRss/413378.htmlhttp://www.tkk7.com/rabbit/services/trackbacks/413378.htmlhttp://www.php100.com/html/program/jquery/2013/0905/5970.html


http://vadikom.com/demos/poshytip/


http://www.cnblogs.com/best/archive/2011/09/27/2193572.html



JQuery鎻掍歡TipsWindown 1.1

涓涓熀浜巎Query鐨勫脊鍑哄眰銆傛敮鎸佹嫋鎷斤紝鏀寔鍐呭涓烘枃瀛楋紝鍥劇墖錛孶RL絳?鑷充簬鍏煎鎬с傚湪IE6涓嬶紝寮瑰嚭瀵瑰儚鏃犳硶緇濆鍥哄畾銆傚叾浠栧簲璇ユ病鍟ュぇ闂錛?/p>

鏈鏂版洿鏂幫細(2010-08-12)錛氫慨姝E6涓嬩笉鑳介伄浣忎笅鎷夎彍鍗曠殑BUG錛屽鍔犳嫋鍔ㄦ椂鍗婇忔槑鏁堟灉銆?/p>

搴旂敤婕旂ず

  1. 寮瑰嚭鏂囨湰淇℃伅鎻愮ず錛?
    tipsWindown("鎻愮ず","text:鎻愮ず淇℃伅鍐呭","250","150","true","","true","msg")
  2. 寮瑰嚭欏甸潰涓殑鏌愪釜ID鐨刪tml錛?
    tipsWindown("鏍囬","id:testID","300","200","true","","true","id")
  3. 寮瑰嚭鍥劇墖錛?
    tipsWindown("鍥劇墖","img:鍥劇墖璺緞","250","150","true","","true","img")
  4. get鍔犺澆涓涓?html鏂囦歡錛堜篃鍙互鏄?php/.asp?id=4涔嬬被鐨勶級錛?
    tipsWindown("鏍囬","url:get?test.html","250","150","true","","true","text");
  5. 鍔犺澆涓涓〉闈㈠埌妗嗘灦鏄劇ず錛?br />
    tipsWindown("鏍囬","iframe:http://www.nowamagic.net","900","580","true","","true","leotheme");
  6. 寮瑰嚭涓涓笉鑳芥嫋鍔ㄤ笖娌℃湁閬僵鑳屾櫙鐨勬枃鏈俊鎭眰錛?
    tipsWindown("鎻愮ず","text:鎻愮ず淇℃伅鍐呭","250","150","false","","false","msg")
  7. 寮瑰嚭涓涓笉鑳芥嫋鍔紝涓夌閽熻嚜鍔ㄥ叧闂殑灞傦細
    tipsWindown("鎻愮ず","text:鎻愮ず淇℃伅鍐呭","250","150","false","3000","true","msg")

鍙傛暟璇存槑

欏哄簭 鍙傛暟 鍔熻兘 澶囨敞
1 title 寮瑰嚭灞傜殑鏍囬 蹇呭~錛岀函鏂囨湰
2 content 寮瑰嚭灞傜殑鍐呭 text 鏂囨湰鍐呭
id 欏甸潰閲屾煇id鐨勫瓙鏍囩
img 鍥劇墖
url get鎴杙ost鏌愪竴欏甸潰閲岀殑html錛岃欏甸潰瑕佹眰鍙寘鍚玝ody鐨勫瓙鏍囩
iframe 鐩爣鍦板潃鍦ㄦ鏋舵樉紺?/td>
3 width 寮瑰嚭灞傜殑瀹?/td> 蹇呭~錛屾瘮濡?#8220;200”銆傦紙涓嶉渶瑕佸甫px錛?/td>
4 height 寮瑰嚭灞傜殑楂?/td> 鍚?width
5 drag 鏄惁鍙嫋鍔?/td> 蹇呭~錛屽彲閫夊弬鏁幫紙true,false錛?/td>
6 time 鑷姩娑堝け鏃墮棿 鍙笉濉紝榛樿涓嶈嚜鍔ㄥ叧闂紱鍙傛暟鍙負絀?"")
7 showbg 鏄惁鏄劇ず閬僵灞?/td> 鍙笉濉紝榛樿涓嶆樉紺猴紙姝ら」濡傚~浜嗭紝瀹冨墠闈㈢殑time涔熷繀欏昏濉級
8 cssName 寮瑰嚭灞傞檮鍔犳牱寮忓悕 鍙笉濉?/td>

鍍忚繖縐嶅脊鍑洪忔槑鑳屾櫙灞傛晥鏋滃緢甯歌浜嗭紝闄ら儴鍒嗗尯鍩熷彲浠ユ搷浣滃鍏朵粬鍖哄煙涓嶈兘鎿嶄綔錛岀洰鍓嶆湁鎻愪緵鎻掍歡錛屽畬鍏ㄥ彲浠ュ疄鐜版縐嶆晥鏋溿?/p>

鏌ョ湅鏈〉婧愪唬鐮佸彲鑾峰彇鎵鏈夋墍闇鐨勪唬鐮併?/p>

Rabbit 2014-05-07 22:23 鍙戣〃璇勮
]]>
鎵歸噺鎻掑叆錛圱est錛?/title><link>http://www.tkk7.com/rabbit/archive/2014/04/15/412487.html</link><dc:creator>Rabbit</dc:creator><author>Rabbit</author><pubDate>Tue, 15 Apr 2014 13:38:00 GMT</pubDate><guid>http://www.tkk7.com/rabbit/archive/2014/04/15/412487.html</guid><wfw:comment>http://www.tkk7.com/rabbit/comments/412487.html</wfw:comment><comments>http://www.tkk7.com/rabbit/archive/2014/04/15/412487.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.tkk7.com/rabbit/comments/commentRss/412487.html</wfw:commentRss><trackback:ping>http://www.tkk7.com/rabbit/services/trackbacks/412487.html</trackback:ping><description><![CDATA[<ol start="1" style="font-size: 12px; line-height: 1.4em; margin: 0px 0px 1px; padding: 2px 0px; border: 1px solid #d1d7dc; list-style-position: initial; list-style-image: initial; background-color: #ffffff; color: #2b91af; font-family: Monaco, 'DejaVu Sans Mono', 'Bitstream Vera Sans Mono', Consolas, 'Courier New', monospace;"><li style="font-size: 1em; margin: 0px 0px 0px 38px; padding: 0px 0px 0px 10px; border-left-width: 1px; border-left-style: solid; border-left-color: #d1d7dc; background-color: #fafafa; line-height: 18px;"><span style="color: black;"><span style="color: #006699; font-weight: bold;"><</span><span style="color: #006699; font-weight: bold;">insert</span> <span style="color: red;">id</span>=<span style="color: blue;">"insertData"</span> <span style="color: red;">parameterType</span>=<span style="color: blue;">"java.util.List"</span> <span style="color: #006699; font-weight: bold;">></span>  </span></li><li style="font-size: 1em; margin: 0px 0px 0px 38px; padding: 0px 0px 0px 10px; border-left-width: 1px; border-left-style: solid; border-left-color: #d1d7dc; background-color: #fafafa; line-height: 18px;"><span style="color: black;">        INSERT INTO EMP(EMPNO,ENAME,JOB,MGR,HIREDATE,SAL,DEPTNO) (  </span></li><li style="font-size: 1em; margin: 0px 0px 0px 38px; padding: 0px 0px 0px 10px; border-left-width: 1px; border-left-style: solid; border-left-color: #d1d7dc; background-color: #fafafa; line-height: 18px;"><span style="color: black;">        <span style="color: #006699; font-weight: bold;"><</span><span style="color: #006699; font-weight: bold;">foreach</span> <span style="color: red;">collection</span>=<span style="color: blue;">"list"</span> <span style="color: red;">item</span>=<span style="color: blue;">"item"</span> <span style="color: red;">index</span>=<span style="color: blue;">"index"</span> <span style="color: red;">separator</span>=<span style="color: blue;">"union all"</span><span style="color: #006699; font-weight: bold;">></span>  </span></li><li style="font-size: 1em; margin: 0px 0px 0px 38px; padding: 0px 0px 0px 10px; border-left-width: 1px; border-left-style: solid; border-left-color: #d1d7dc; background-color: #fafafa; line-height: 18px;"><span style="color: black;">            select  </span></li><li style="font-size: 1em; margin: 0px 0px 0px 38px; padding: 0px 0px 0px 10px; border-left-width: 1px; border-left-style: solid; border-left-color: #d1d7dc; background-color: #fafafa; line-height: 18px;"><span style="color: black;">                #{item.EMPNO,<span style="color: red;">jdbcType</span>=<span style="color: blue;">VARCHAR</span>},  </span></li><li style="font-size: 1em; margin: 0px 0px 0px 38px; padding: 0px 0px 0px 10px; border-left-width: 1px; border-left-style: solid; border-left-color: #d1d7dc; background-color: #fafafa; line-height: 18px;"><span style="color: black;">                #{item.ENAME,<span style="color: red;">jdbcType</span>=<span style="color: blue;">VARCHAR</span>},  </span></li><li style="font-size: 1em; margin: 0px 0px 0px 38px; padding: 0px 0px 0px 10px; border-left-width: 1px; border-left-style: solid; border-left-color: #d1d7dc; background-color: #fafafa; line-height: 18px;"><span style="color: black;">                #{item.JOB,<span style="color: red;">jdbcType</span>=<span style="color: blue;">VARCHAR</span>},  </span></li><li style="font-size: 1em; margin: 0px 0px 0px 38px; padding: 0px 0px 0px 10px; border-left-width: 1px; border-left-style: solid; border-left-color: #d1d7dc; background-color: #fafafa; line-height: 18px;"><span style="color: black;">                #{item.MGR,<span style="color: red;">jdbcType</span>=<span style="color: blue;">NUMERIC</span>},  </span></li><li style="font-size: 1em; margin: 0px 0px 0px 38px; padding: 0px 0px 0px 10px; border-left-width: 1px; border-left-style: solid; border-left-color: #d1d7dc; background-color: #fafafa; line-height: 18px;"><span style="color: black;">                #{item.MGR,<span style="color: red;">jdbcType</span>=<span style="color: blue;">NUMERIC</span>},  </span></li><li style="font-size: 1em; margin: 0px 0px 0px 38px; padding: 0px 0px 0px 10px; border-left-width: 1px; border-left-style: solid; border-left-color: #d1d7dc; background-color: #fafafa; line-height: 18px;"><span style="color: black;">                TO_DATE(#{item.HIREDATE,<span style="color: red;">jdbcType</span>=<span style="color: blue;">VARCHAR</span>},'yyyy-mm-dd')  </span></li><li style="font-size: 1em; margin: 0px 0px 0px 38px; padding: 0px 0px 0px 10px; border-left-width: 1px; border-left-style: solid; border-left-color: #d1d7dc; background-color: #fafafa; line-height: 18px;"><span style="color: black;">                  from dual  </span></li><li style="font-size: 1em; margin: 0px 0px 0px 38px; padding: 0px 0px 0px 10px; border-left-width: 1px; border-left-style: solid; border-left-color: #d1d7dc; background-color: #fafafa; line-height: 18px;"><span style="color: black;">        <span style="color: #006699; font-weight: bold;"></</span><span style="color: #006699; font-weight: bold;">foreach</span><span style="color: #006699; font-weight: bold;">></span>  </span></li><li style="font-size: 1em; margin: 0px 0px 0px 38px; padding: 0px 0px 0px 10px; border-left-width: 1px; border-left-style: solid; border-left-color: #d1d7dc; background-color: #fafafa; line-height: 18px;"><span style="color: black;">        )  </span></li><li style="font-size: 1em; margin: 0px 0px 0px 38px; padding: 0px 0px 0px 10px; border-left-width: 1px; border-left-style: solid; border-left-color: #d1d7dc; background-color: #fafafa; line-height: 18px;"><span style="color: black;"><span style="color: #006699; font-weight: bold;"></</span><span style="color: #006699; font-weight: bold;">insert</span><span style="color: #006699; font-weight: bold;">></span> <br /><br />=====================================================================<br /><br /><br /><div>declare    </div><div>  type t_array is table of t_target%rowtype;    </div><div>  t_data t_array;    </div><div>  cursor c is    </div><div>    select null id, owner, object_name, null object_id, null xx, null yy    </div><div>    from dba_objects;    </div><div>begin    </div><div>  open c;    </div><div>  loop    </div><div>    fetch c bulk collect    </div><div>    into t_data limit 100;    </div><div>    </div><div>    forall i in 1 .. t_data.count    </div><div>      insert into t_target values t_data (i);    </div><div>    exit when c%notfound;    </div><div>  end loop;    </div><div>  close c;    </div><div>  commit;    </div><div>end; <br /><br /><br /><br /><pre style="margin-top: 0px; margin-bottom: 0px; padding: 0px; white-space: pre-wrap; word-wrap: break-word; color: #333333; line-height: 21px; font-family: 'Courier New' !important;"><span style="margin: 0px; padding: 0px; color: #0000ff; line-height: 1.5 !important;"><</span><span style="margin: 0px; padding: 0px; color: #800000; line-height: 1.5 !important;">insert </span><span style="margin: 0px; padding: 0px; color: #ff0000; line-height: 1.5 !important;">id</span><span style="margin: 0px; padding: 0px; color: #0000ff; line-height: 1.5 !important;">="insertByProc"</span><span style="margin: 0px; padding: 0px; color: #ff0000; line-height: 1.5 !important;"> statementType</span><span style="margin: 0px; padding: 0px; color: #0000ff; line-height: 1.5 !important;">="CALLABLE"</span><span style="margin: 0px; padding: 0px; color: #0000ff; line-height: 1.5 !important;">></span> <span style="margin: 0px; padding: 0px; color: #000000; line-height: 1.5 !important;"> <br />{call insertPro(#{name},#{age},#{sex},#{password},#{num})} </span> <br /><span style="margin: 0px; padding: 0px; color: #0000ff; line-height: 1.5 !important;"></</span><span style="margin: 0px; padding: 0px; color: #800000; line-height: 1.5 !important;">insert</span><span style="margin: 0px; padding: 0px; color: #0000ff; line-height: 1.5 !important;">><br /><br /><pre style="margin-top: 0px; margin-bottom: 0px; padding: 0px; white-space: pre-wrap; word-wrap: break-word; color: #333333; line-height: 21px; font-family: 'Courier New' !important;"><span style="margin: 0px; padding: 0px; color: #008080; line-height: 1.5 !important;">1</span> <span style="margin: 0px; padding: 0px; color: #0000ff; line-height: 1.5 !important;">CREATE</span> DEFINER <span style="margin: 0px; padding: 0px; color: #808080; line-height: 1.5 !important;">=</span> `root`@`localhost` <span style="margin: 0px; padding: 0px; color: #0000ff; line-height: 1.5 !important;">PROCEDURE</span> `NewProc`(<span style="margin: 0px; padding: 0px; color: #808080; line-height: 1.5 !important;">IN</span> `name_in` <span style="margin: 0px; padding: 0px; color: #0000ff; line-height: 1.5 !important;">varchar</span>(<span style="margin: 0px; padding: 0px; color: #800000; font-weight: bold; line-height: 1.5 !important;">255</span>),<span style="margin: 0px; padding: 0px; color: #808080; line-height: 1.5 !important;">IN</span> `age_in` <span style="margin: 0px; padding: 0px; color: #0000ff; line-height: 1.5 !important;">int</span>,<span style="margin: 0px; padding: 0px; color: #808080; line-height: 1.5 !important;">IN</span> `sex_in` <span style="margin: 0px; padding: 0px; color: #0000ff; line-height: 1.5 !important;">varchar</span>(<span style="margin: 0px; padding: 0px; color: #800000; font-weight: bold; line-height: 1.5 !important;">255</span>),<span style="margin: 0px; padding: 0px; color: #808080; line-height: 1.5 !important;">IN</span> `password_in` <span style="margin: 0px; padding: 0px; color: #0000ff; line-height: 1.5 !important;">varchar</span>(<span style="margin: 0px; padding: 0px; color: #800000; font-weight: bold; line-height: 1.5 !important;">255</span>),<span style="margin: 0px; padding: 0px; color: #808080; line-height: 1.5 !important;">IN</span> `num_in` <span style="margin: 0px; padding: 0px; color: #0000ff; line-height: 1.5 !important;">int</span><span style="margin: 0px; padding: 0px; color: #000000; line-height: 1.5 !important;">) </span><span style="margin: 0px; padding: 0px; color: #008080; line-height: 1.5 !important;"> 2</span> <span style="margin: 0px; padding: 0px; color: #0000ff; line-height: 1.5 !important;">BEGIN</span> <span style="margin: 0px; padding: 0px; color: #008080; line-height: 1.5 !important;"> 3</span> <span style="margin: 0px; padding: 0px; color: #0000ff; line-height: 1.5 !important;">SET</span> <span style="margin: 0px; padding: 0px; color: #008000; line-height: 1.5 !important;">@a</span><span style="margin: 0px; padding: 0px; color: #808080; line-height: 1.5 !important;">=</span><span style="margin: 0px; padding: 0px; color: #800000; font-weight: bold; line-height: 1.5 !important;">0</span><span style="margin: 0px; padding: 0px; color: #000000; line-height: 1.5 !important;">; </span><span style="margin: 0px; padding: 0px; color: #008080; line-height: 1.5 !important;"> 4</span> <span style="margin: 0px; padding: 0px; color: #000000; line-height: 1.5 !important;">Label:LOOP </span><span style="margin: 0px; padding: 0px; color: #008080; line-height: 1.5 !important;"> 5</span> <span style="margin: 0px; padding: 0px; color: #0000ff; line-height: 1.5 !important;">SET</span> <span style="margin: 0px; padding: 0px; color: #008000; line-height: 1.5 !important;">@a</span><span style="margin: 0px; padding: 0px; color: #808080; line-height: 1.5 !important;">=</span><span style="margin: 0px; padding: 0px; color: #008000; line-height: 1.5 !important;">@a</span><span style="margin: 0px; padding: 0px; color: #808080; line-height: 1.5 !important;">+</span><span style="margin: 0px; padding: 0px; color: #800000; font-weight: bold; line-height: 1.5 !important;">1</span><span style="margin: 0px; padding: 0px; color: #000000; line-height: 1.5 !important;">; </span><span style="margin: 0px; padding: 0px; color: #008080; line-height: 1.5 !important;"> 6</span> <span style="margin: 0px; padding: 0px; color: #0000ff; line-height: 1.5 !important;">INSERT</span> <span style="margin: 0px; padding: 0px; color: #0000ff; line-height: 1.5 !important;">INTO</span> person ( name, age, sex, password) <span style="margin: 0px; padding: 0px; color: #0000ff; line-height: 1.5 !important;">VALUES</span><span style="margin: 0px; padding: 0px; color: #000000; line-height: 1.5 !important;"> (name_in,age_in,sex_in,password_in); </span><span style="margin: 0px; padding: 0px; color: #008080; line-height: 1.5 !important;"> 7</span> <span style="margin: 0px; padding: 0px; color: #0000ff; line-height: 1.5 !important;">IF</span> <span style="margin: 0px; padding: 0px; color: #008000; line-height: 1.5 !important;">@a</span><span style="margin: 0px; padding: 0px; color: #808080; line-height: 1.5 !important;">=</span>num_in <span style="margin: 0px; padding: 0px; color: #0000ff; line-height: 1.5 !important;">THEN</span> <span style="margin: 0px; padding: 0px; color: #008080; line-height: 1.5 !important;"> 8</span> <span style="margin: 0px; padding: 0px; color: #000000; line-height: 1.5 !important;"> LEAVE Label; </span><span style="margin: 0px; padding: 0px; color: #008080; line-height: 1.5 !important;"> 9</span> <span style="margin: 0px; padding: 0px; color: #0000ff; line-height: 1.5 !important;">END</span> <span style="margin: 0px; padding: 0px; color: #0000ff; line-height: 1.5 !important;">IF</span><span style="margin: 0px; padding: 0px; color: #000000; line-height: 1.5 !important;">; </span><span style="margin: 0px; padding: 0px; color: #008080; line-height: 1.5 !important;">10</span> <span style="margin: 0px; padding: 0px; color: #0000ff; line-height: 1.5 !important;">END</span><span style="margin: 0px; padding: 0px; color: #000000; line-height: 1.5 !important;"> LOOP Label; </span><span style="margin: 0px; padding: 0px; color: #008080; line-height: 1.5 !important;">11</span> <span style="margin: 0px; padding: 0px; color: #0000ff; line-height: 1.5 !important;">END</span>;</pre></span></pre></div><br /></span></li></ol><img src ="http://www.tkk7.com/rabbit/aggbug/412487.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.tkk7.com/rabbit/" target="_blank">Rabbit</a> 2014-04-15 21:38 <a href="http://www.tkk7.com/rabbit/archive/2014/04/15/412487.html#Feedback" target="_blank" style="text-decoration:none;">鍙戣〃璇勮</a></div>]]></description></item><item><title>Oracle涓璈int娣卞叆鐞嗚Вhttp://www.tkk7.com/rabbit/archive/2013/11/08/406141.htmlRabbitRabbitFri, 08 Nov 2013 06:44:00 GMThttp://www.tkk7.com/rabbit/archive/2013/11/08/406141.htmlhttp://www.tkk7.com/rabbit/comments/406141.htmlhttp://www.tkk7.com/rabbit/archive/2013/11/08/406141.html#Feedback0http://www.tkk7.com/rabbit/comments/commentRss/406141.htmlhttp://www.tkk7.com/rabbit/services/trackbacks/406141.htmlHint姒傝堪
鍩轟簬浠d環鐨勪紭鍖栧櫒鏄緢鑱槑鐨勶紝鍦ㄧ粷澶у鏁版儏鍐典笅瀹冧細閫夋嫨姝g‘鐨勪紭鍖栧櫒錛屽噺杞諱簡DBA鐨勮礋鎷呫備絾鏈夋椂瀹冧篃鑱槑鍙嶈鑱槑璇紝閫夋嫨浜嗗緢宸殑鎵ц璁″垝錛屼嬌鏌愪釜璇彞鐨勬墽琛屽彉寰楀鎱㈡棤姣斻?/font>

姝ゆ椂灝遍渶瑕丏BA榪涜浜轟負鐨勫共棰勶紝鍛婅瘔浼樺寲鍣ㄤ嬌鐢ㄦ垜浠寚瀹氱殑瀛樺彇璺緞鎴栬繛鎺ョ被鍨嬬敓鎴愭墽琛岃鍒掞紝浠庤屼嬌璇彞楂樻晥鐨勮繍琛屻備緥濡傦紝濡傛灉鎴戜滑璁や負瀵逛簬涓涓壒瀹氱殑璇彞錛屾墽琛屽叏琛ㄦ壂鎻忚姣旀墽琛岀儲寮曟壂鎻忔洿鏈夋晥錛屽垯鎴戜滑灝卞彲浠ユ寚紺轟紭鍖栧櫒浣跨敤鍏ㄨ〃鎵弿銆傚湪Oracle 涓紝鏄氳繃涓鴻鍙ユ坊鍔?Hints(鎻愮ず)鏉ュ疄鐜板共棰勪紭鍖栧櫒浼樺寲鐨勭洰鐨勩?br />涓嶅緩璁湪浠g爜涓嬌鐢╤int錛屽湪浠g爜浣跨敤hint浣垮緱CBO鏃犳硶鏍規嵁瀹為檯鐨勬暟鎹姸鎬侀夋嫨姝g‘鐨勬墽琛岃鍒掋傛瘯绔?/font> 鏁版嵁鏄笉鏂彉鍖栫殑錛?/font> 10g浠ュ悗鐨凜BO涔熻秺鏉ヨ秺瀹屽杽錛屽ぇ澶氭暟鎯呭喌涓嬫垜浠璁㎡racle鑷鍐沖畾閲囩敤浠涔堟墽琛岃鍒掋?/font>

Oracle Hints鏄竴縐嶆満鍒訛紝鐢ㄦ潵鍛婅瘔浼樺寲鍣ㄦ寜鐓ф垜浠殑鍛婅瘔瀹冪殑鏂瑰紡鐢熸垚鎵ц璁″垝銆傛垜浠彲浠ョ敤Oracle Hints鏉ュ疄鐜幫細
1) 浣跨敤鐨勪紭鍖栧櫒鐨勭被鍨?br />2) 鍩轟簬浠d環鐨勪紭鍖栧櫒鐨勪紭鍖栫洰鏍囷紝鏄痑ll_rows榪樻槸first_rows銆?br />3) 琛ㄧ殑璁塊棶璺緞錛屾槸鍏ㄨ〃鎵弿錛岃繕鏄儲寮曟壂鎻忥紝榪樻槸鐩存帴鍒╃敤rowid銆?br />4) 琛ㄤ箣闂寸殑榪炴帴綾誨瀷
5) 琛ㄤ箣闂寸殑榪炴帴欏哄簭
6) 璇彞鐨勫茍琛岀▼搴?/font>

闄や簡”RULE”鎻愮ず澶栵紝涓鏃︿嬌鐢ㄧ殑鍒殑鎻愮ず錛岃鍙ュ氨浼氳嚜鍔ㄧ殑鏀逛負浣跨敤CBO浼樺寲鍣紝姝ゆ椂濡傛灉浣犵殑鏁版嵁瀛楀吀涓病鏈夌粺璁℃暟鎹紝灝變細浣跨敤緙虹渷鐨勭粺璁℃暟鎹傛墍浠ュ緩璁ぇ瀹跺鏋滀嬌鐢–BO鎴朒ints鎻愮ず錛屽垯鏈濂藉琛ㄥ拰绱㈠紩榪涜瀹氭湡鐨勫垎鏋愩?/font>

濡備綍浣跨敤Hints:

Hints鍙簲鐢ㄥ湪瀹冧滑鎵鍦╯ql璇彞鍧?statement block錛岀敱select銆乽pdate銆乨elete鍏抽敭瀛楁爣璇?涓婏紝瀵瑰叾瀹僑QL璇彞鎴栬鍙ョ殑鍏跺畠閮ㄥ垎娌℃湁褰卞搷銆傚錛氬浜庝嬌鐢╱nion鎿嶄綔鐨?涓猻ql璇彞錛屽鏋滃彧鍦ㄤ竴涓猻ql璇彞涓婃湁Hints錛屽垯璇ints涓嶄細褰卞搷鍙︿竴涓猻ql璇彞銆?/font>

鎴戜滑鍙互浣跨敤娉ㄩ噴(comment)鏉ヤ負涓涓鍙ユ坊鍔燞ints錛屼竴涓鍙ュ潡鍙兘鏈変竴涓敞閲婏紝鑰屼笖娉ㄩ噴鍙兘鏀懼湪SELECT, UPDATE, or DELETE鍏抽敭瀛楃殑鍚庨潰

浣跨敤Oracle Hints鐨勮娉曪細

{DELETE|INSERT|SELECT|UPDATE} /*+ hint [text] [hint[text]]... */

or

{DELETE|INSERT|SELECT|UPDATE} --+ hint [text] [hint[text]]...

娉ㄨВ錛?br />1) DELETE銆両NSERT銆丼ELECT鍜孶PDATE鏄爣璇嗕竴涓鍙ュ潡寮濮嬬殑鍏抽敭瀛楋紝鍖呭惈鎻愮ず鐨勬敞閲婂彧鑳藉嚭鐜板湪榪欎簺鍏抽敭瀛楃殑鍚庨潰錛屽惁鍒欐彁紺烘棤鏁堛?br />2) “+”鍙瘋〃紺鴻娉ㄩ噴鏄竴涓狧ints錛岃鍔犲彿蹇呴』绔嬪嵆璺熷湪”/*”鐨勫悗闈紝涓棿涓嶈兘鏈夌┖鏍箋?br />3) hint鏄笅闈粙緇嶇殑鍏蜂綋鎻愮ず涔嬩竴錛屽鏋滃寘鍚涓彁紺猴紝鍒欐瘡涓彁紺轟箣闂撮渶瑕佺敤涓涓垨澶氫釜絀烘牸闅斿紑銆?br />4) text 鏄叾瀹冭鏄巋int鐨勬敞閲婃ф枃鏈?/font>

5)浣跨敤琛ㄥ埆鍚嶃傚鏋滃湪鏌ヨ涓寚瀹氫簡琛ㄥ埆鍚嶏紝閭d箞鎻愮ず蹇呴』涔熶嬌鐢ㄨ〃鍒悕銆備緥濡傦細select /*+ index(e,dept_idx) */ * from emp e;
6)涓嶈鍦ㄦ彁紺轟腑浣跨敤妯″紡鍚嶇О錛氬鏋滃湪鎻愮ず涓寚瀹氫簡妯″紡鐨勬墍鏈夎咃紝閭d箞鎻愮ず灝嗚蹇界暐銆備緥濡傦細
select /*+ index(scott.emp,dept_idx) */ * from emp

娉ㄦ剰錛氬鏋滀綘娌℃湁姝g‘鐨勬寚瀹欻ints錛孫racle灝嗗拷鐣ヨHints錛屽茍涓斾笉浼氱粰鍑轟換浣曢敊璇?br />hint琚拷鐣?/strong>

濡傛灉CBO璁や負浣跨敤hint浼氬鑷撮敊璇殑緇撴灉鏃訛紝hint灝嗚蹇界暐錛岃瑙佷笅渚?br />SQL> select /*+ index(t t_ind) */ count(*) from t;
Execution Plan
----------------------------------------------------------
Plan hash value: 2966233522
-------------------------------------------------------------------
| Id  | Operation          | Name | Rows  | Cost (%CPU)| Time     |
-------------------------------------------------------------------
|   0 | SELECT STATEMENT   |      |     1 |    57   (2)| 00:00:01 |
|   1 |  SORT AGGREGATE    |      |     1 |            |          |
|   2 |   TABLE ACCESS FULL| T    | 50366 |    57   (2)| 00:00:01 |
-------------------------------------------------------------------

鍥犱負鎴戜滑鏄璁板綍姹傛繪暟錛屼笖鎴戜滑騫舵病鏈夊湪寤虹珛绱㈠紩鏃舵寚瀹氫笉鑳戒負絀猴紝绱㈠紩濡傛灉CBO閫夋嫨鍦ㄧ儲寮曚笂榪涜count鏃訛紝浣嗙儲寮曞瓧孌典笂鐨勫間負絀烘椂錛岀粨鏋滃皢涓嶅噯紜紝鏁匔BO娌℃湁閫夋嫨绱㈠紩銆?/font>
SQL>  select /*+ index(t t_ind) */ count(id) from t;
Execution Plan
----------------------------------------------------------
Plan hash value: 646498162
--------------------------------------------------------------------------
| Id  | Operation        | Name  | Rows  | Bytes | Cost (%CPU)| Time     |
--------------------------------------------------------------------------
|   0 | SELECT STATEMENT |       |     1 |     5 |   285   (1)| 00:00:04 |
|   1 |  SORT AGGREGATE  |       |     1 |     5 |            |          |
|   2 |   INDEX FULL SCAN| T_IND | 50366 |   245K|   285   (1)| 00:00:04 |
--------------------------------------------------------------------------

鍥犱負鎴戜滑鍙id榪涜count錛岃繖涓姩浣滅浉褰撲簬count绱㈠紩涓婄殑鎵鏈塱d鍊鹼紝榪欎釜鎿嶄綔鍜屽琛ㄤ笂鐨刬d瀛楁榪涜count鏄竴鏍風殑(緇勫嚱鏁頒細蹇界暐null鍊?

Hint鐨勫叿浣撶敤娉?br />

鍜屼紭鍖栧櫒鐩稿叧鐨刪int

1銆?*+ ALL_ROWS */
琛ㄦ槑瀵硅鍙ュ潡閫夋嫨鍩轟簬寮閿鐨勪紭鍖栨柟娉?騫惰幏寰楁渶浣沖悶鍚愰噺,浣胯祫婧愭秷鑰楁渶灝忓寲.
SELECT /*+ ALL+_ROWS*/ EMP_NO,EMP_NAM,DAT_IN FROM BSEMPMS WHERE EMP_NO='SCOTT';

2銆?*+ FIRST_ROWS(n) */
琛ㄦ槑瀵硅鍙ュ潡閫夋嫨鍩轟簬寮閿鐨勪紭鍖栨柟娉?騫惰幏寰楁渶浣沖搷搴旀椂闂?浣胯祫婧愭秷鑰楁渶灝忓寲.
SELECT /*+FIRST_ROWS(20) */ EMP_NO,EMP_NAM,DAT_IN FROM BSEMPMS WHERE EMP_NO='SCOTT';
3銆?*+ RULE*/
琛ㄦ槑瀵硅鍙ュ潡閫夋嫨鍩轟簬瑙勫垯鐨勪紭鍖栨柟娉?
SELECT /*+ RULE */ EMP_NO,EMP_NAM,DAT_IN FROM BSEMPMS WHERE EMP_NO='SCOTT';
鍜岃闂礬寰勭浉鍏崇殑hint

1銆?*+ FULL(TABLE)*/
琛ㄦ槑瀵硅〃閫夋嫨鍏ㄥ眬鎵弿鐨勬柟娉?
SELECT /*+FULL(A)*/ EMP_NO,EMP_NAM FROM BSEMPMS A WHERE EMP_NO='SCOTT';

2銆?*+ INDEX(TABLE INDEX_NAME) */
琛ㄦ槑瀵硅〃閫夋嫨绱㈠紩鐨勬壂鎻忔柟娉?
SELECT /*+INDEX(BSEMPMS SEX_INDEX) */ * FROM BSEMPMS WHERE SEX='M';
5銆?*+ INDEX_ASC(TABLE INDEX_NAME)*/
琛ㄦ槑瀵硅〃閫夋嫨绱㈠紩鍗囧簭鐨勬壂鎻忔柟娉?
SELECT /*+INDEX_ASC(BSEMPMS PK_BSEMPMS) */ * FROM BSEMPMS WHERE DPT_NO='SCOTT';
6銆?*+ INDEX_COMBINE*/
涓烘寚瀹氳〃閫夋嫨浣嶅浘璁塊棶璺粡,濡傛灉INDEX_COMBINE涓病鏈夋彁渚涗綔涓哄弬鏁扮殑绱㈠紩,灝嗛夋嫨鍑轟綅鍥劇儲寮曠殑甯冨皵緇勫悎鏂瑰紡.
SELECT /*+INDEX_COMBINE(BSEMPMS SAL_BMI HIREDATE_BMI) */  * FROM BSEMPMS
WHERE SAL<5000000 AND HIREDATE

7銆?*+ INDEX_JOIN(TABLE INDEX_NAME1 INDEX_NAME2) */
褰撹皳璇嶄腑寮曠敤鐨勫垪閮芥湁绱㈠紩鐨勬椂鍊欙紝鍙互閫氳繃鎸囧畾閲囩敤绱㈠紩鍏寵仈鐨勬柟寮忥紝鏉ヨ闂暟鎹?br />
select /*+ index_join(t t_ind t_bm) */ id from t where id=100 and object_name='EMPLOYEES'
8銆?*+ INDEX_DESC(TABLE INDEX_NAME)*/
琛ㄦ槑瀵硅〃閫夋嫨绱㈠紩闄嶅簭鐨勬壂鎻忔柟娉?

SELECT /*+INDEX_DESC(BSEMPMS PK_BSEMPMS) */ * FROM BSEMPMS WHERE DPT_NO='SCOTT';
9銆?*+ INDEX_FFS(TABLE INDEX_NAME) */
瀵規寚瀹氱殑琛ㄦ墽琛屽揩閫熷叏绱㈠紩鎵弿,鑰屼笉鏄叏琛ㄦ壂鎻忕殑鍔炴硶.
SELECT /* + INDEX_FFS(BSEMPMS IN_EMPNAM)*/ * FROM BSEMPMS WHERE DPT_NO='TEC305';

10銆?*+ INDEX_SS(T T_IND) */
浠?i寮濮嬶紝oracle寮曞叆浜嗚繖縐嶇儲寮曡闂柟寮忋傚綋鍦ㄤ竴涓仈鍚堢儲寮曚腑錛屾煇浜涜皳璇嶆潯浠跺茍涓嶅湪鑱斿悎绱㈠紩鐨勭涓鍒楁椂錛屽彲浠ラ氳繃Index Skip Scan鏉ヨ闂儲寮曡幏寰楁暟鎹傚綋鑱斿悎绱㈠紩絎竴鍒楃殑鍞竴鍊間釜鏁板緢灝戞椂錛屼嬌鐢ㄨ繖縐嶆柟寮忔瘮鍏ㄨ〃鎵弿鏁堢巼楂樸?/font>

SQL> create table t as select 1 id,object_name from dba_objects;
Table created.
SQL> insert into t select 2,object_name from dba_objects;      
50366 rows created.
SQL> insert into t select 3,object_name from dba_objects;      
50366 rows created.

SQL> insert into t select 4,object_name from dba_objects;      
50366 rows created.

SQL> commit;
Commit complete.
SQL> create index t_ind on t(id,object_name);
Index created.
SQL> exec dbms_stats.gather_table_stats('HR','T',cascade=>true);
PL/SQL procedure successfully completed.
鎵ц鍏ㄨ〃鎵弿
SQL> select /*+ full(t) */ * from t where object_name='EMPLOYEES';
6 rows selected.
Execution Plan
----------------------------------------------------------
Plan hash value: 1601196873
--------------------------------------------------------------------------
| Id  | Operation         | Name | Rows  | Bytes | Cost (%CPU)| Time     |
--------------------------------------------------------------------------
|   0 | SELECT STATEMENT  |      |     5 |   135 |   215   (3)| 00:00:03 |
|*  1 |  TABLE ACCESS FULL| T    |     5 |   135 |   215   (3)| 00:00:03 |
--------------------------------------------------------------------------
Predicate Information (identified by operation id):
---------------------------------------------------
   1 - filter("OBJECT_NAME"='EMPLOYEES')
Statistics
----------------------------------------------------------
          0  recursive calls
          0  db block gets
        942  consistent gets
          0  physical reads
          0  redo size
        538  bytes sent via SQL*Net to client
        385  bytes received via SQL*Net from client
          2  SQL*Net roundtrips to/from client
          0  sorts (memory)
          0  sorts (disk)
          6  rows processed
涓嶉噰鐢╤int
SQL>  select * from t where object_name='EMPLOYEES';
6 rows selected.
Execution Plan
----------------------------------------------------------
Plan hash value: 2869677071
--------------------------------------------------------------------------
| Id  | Operation        | Name  | Rows  | Bytes | Cost (%CPU)| Time     |
--------------------------------------------------------------------------
|   0 | SELECT STATEMENT |       |     5 |   135 |     5   (0)| 00:00:01 |
|*  1 |  INDEX SKIP SCAN | T_IND |     5 |   135 |     5   (0)| 00:00:01 |
--------------------------------------------------------------------------
Predicate Information (identified by operation id):
---------------------------------------------------
   1 - access("OBJECT_NAME"='EMPLOYEES')
       filter("OBJECT_NAME"='EMPLOYEES')
Statistics
----------------------------------------------------------
          1  recursive calls
          0  db block gets
         17  consistent gets
          1  physical reads
          0  redo size
        538  bytes sent via SQL*Net to client
        385  bytes received via SQL*Net from client
          2  SQL*Net roundtrips to/from client
          0  sorts (memory)
          0  sorts (disk)
          6  rows processed

褰撳叏琛ㄦ壂鎻忔壂鎻忎簡942涓潡錛岃仈鍚堢儲寮曞彧鎵弿浜?7涓暟鎹潡銆傚彲浠ョ湅鍒拌仈鍚堢儲寮曠殑絎竴涓瓧孌電殑鍊奸噸澶嶇巼寰堥珮鏃訛紝鍗充嬌璋撹瘝涓病鏈夎仈鍚堢儲寮曠殑絎竴涓瓧孌碉紝渚濈劧浼氫嬌鐢╥ndex_ss鏂瑰紡錛屾晥鐜囪繙榪滈珮浜庡叏琛ㄦ壂鎻忔晥鐜囥備絾褰?/font>
絎竴涓瓧孌電殑鍊奸噸澶嶇巼寰堜綆鏃訛紝浣跨敤 index_ss鐨勬晥鐜囪浣庝簬 鍏ㄨ〃鎵弿錛岃鑰呭彲浠ヨ嚜琛屽疄楠?/font>
鍜岃〃鐨勫叧鑱旂浉鍏崇殑hint

/*+ leading(table_1,table_2) */

鍦ㄥ琛ㄥ叧鑱旀煡璇腑錛屾寚瀹氬摢涓〃浣滀負椹卞姩琛紝鍗沖憡璇変紭鍖栧櫒棣栧厛瑕佽闂摢涓〃涓婄殑鏁版嵁銆?/span>
select /*+ leading(t,t1) */ t.* from t,t1 where t.id=t1.id;

/*+ order */

璁㎡racle鏍規嵁from鍚庨潰琛ㄧ殑欏哄簭鏉ラ夋嫨椹卞姩琛紝oracle寤鴻浣跨敤leading錛屼粬鏇翠負鐏墊椿
select /*+ order */ t.* from t,t1 where t.id=t1.id;
/*+ use_nl(table_1,table_2) */
鍦ㄥ琛ㄥ叧鑱旀煡璇腑錛屾寚瀹氫嬌鐢╪est loops鏂瑰紡榪涜澶氳〃鍏寵仈銆?/span>

select /*+ use_nl(t,t1) */ t.* from t,t1 where t.id=t1.id;

/*+ use_hash(table_1,table_2) */
鍦ㄥ琛ㄥ叧鑱旀煡璇腑錛屾寚瀹氫嬌鐢╤ash join鏂瑰紡榪涜澶氳〃鍏寵仈銆?/span>

select /*+ use_hash(t,t1) */ t.* from t,t1 where t.id=t1.id;

鍦ㄥ琛ㄥ叧鑱旀煡璇腑錛屾寚瀹氫嬌鐢╤ash join鏂瑰紡榪涜澶氳〃鍏寵仈錛屽茍鎸囧畾琛╰涓洪┍鍔ㄨ〃銆?/font>

select /*+ use_hash(t,t1) leading(t,t1) */ t.* from t,t1 where t.id=t1.id;

/*+ use_merge(table_1,table_2) */
鍦ㄥ琛ㄥ叧鑱旀煡璇腑錛屾寚瀹氫嬌鐢╩erge join鏂瑰紡榪涜澶氳〃鍏寵仈銆?/span>

select /*+ use_merge(t,t1) */ t.* from t,t1 where t.id=t1.id;

/*+ no_use_nl(table_1,table_2) */
鍦ㄥ琛ㄥ叧鑱旀煡璇腑錛屾寚瀹氫笉浣跨敤nest loops鏂瑰紡榪涜澶氳〃鍏寵仈銆?/span>

select /*+ no_use_nl(t,t1) */ t.* from t,t1 where t.id=t1.id;

/*+ no_use_hash(table_1,table_2) */
鍦ㄥ琛ㄥ叧鑱旀煡璇腑錛屾寚瀹氫笉浣跨敤hash join鏂瑰紡榪涜澶氳〃鍏寵仈銆?/span>

select /*+ no_use_hash(t,t1) */ t.* from t,t1 where t.id=t1.id;

/*+ no_use_merge(table_1,table_2) */
鍦ㄥ琛ㄥ叧鑱旀煡璇腑錛屾寚瀹氫笉浣跨敤merge join鏂瑰紡榪涜澶氳〃鍏寵仈銆?/span>

select /*+ no_use_merge(t,t1) */ t.* from t,t1 where t.id=t1.id;

鍏朵粬甯哥敤鐨刪int

/*+ parallel(table_name n) */

鍦╯ql涓寚瀹氭墽琛岀殑騫惰搴︼紝榪欎釜鍊煎皢浼氳鐩栬嚜韜殑騫惰搴?br />

select /*+ parallel(t 4) */ count(*)  from t;

/*+ no_parallel(table_name) */

鍦╯ql涓寚瀹氭墽琛岀殑涓嶄嬌鐢ㄥ茍琛?br />

select /*+ no_parallel(t) */ count(*)  from t;

/*+ append */浠ョ洿鎺ュ姞杞界殑鏂瑰紡灝嗘暟鎹姞杞藉叆搴?

insert into t /*+ append */ select * from t;

/*+ dynamic_sampling(table_name n) */

璁劇疆sql鎵ц鏃跺姩鎬侀噰鐢ㄧ殑綰у埆錛岃繖涓駭鍒負0~10
select /*+ dynamic_sampling(t 4) */ * from t where id > 1234

/*+ cache(table_name) */
榪涜鍏ㄨ〃鎵弿鏃跺皢table緗簬LRU鍒楄〃鐨勬渶媧昏穬绔紝綾諱技浜巘able鐨刢ache灞炴?br />

select /*+ full(employees) cache(employees) */ last_name from employees
闄勫綍hint琛ㄦ牸

Hints for Optimization Approaches and Goals

ALL_ROWS The ALL_ROWS hint explicitly chooses the cost-based approach to optimize a statement block with a goal of best throughput (that is, minimum total resource consumption).
FIRST_ROWS The FIRST_ROWS hint explicitly chooses the cost-based approach to optimize a statement block with a goal of best response time (minimum resource usage to return first row). In newer Oracle version you should give a parameter with this hint: FIRST_ROWS(n) means that the optimizer will determine an executionplan to give a fast response for returning the first n rows.
CHOOSE The CHOOSE hint causes the optimizer to choose between the rule-based approach and the cost-based approach for a SQL statement based on the presence of statistics for the tables accessed by the statement
RULE The RULE hint explicitly chooses rule-based optimization for a statement block. This hint also causes the optimizer to ignore any other hints specified for the statement block. The RULE hint does not work any more in Oracle 10g.

Hints for Access Paths

FULL The FULL hint explicitly chooses a full table scan for the specified table. The syntax of the FULL hint is FULL(table) where table specifies the alias of the table (or table name if alias does not exist) on which the full table scan is to be performed.
ROWID The ROWID hint explicitly chooses a table scan by ROWID for the specified table. The syntax of the ROWID hint is ROWID(table) where table specifies the name or alias of the table on which the table access by ROWID is to be performed. (This hint depricated in Oracle 10g)
CLUSTER The CLUSTER hint explicitly chooses a cluster scan to access the specified table. The syntax of the CLUSTER hint is CLUSTER(table) where table specifies the name or alias of the table to be accessed by a cluster scan.
HASH The HASH hint explicitly chooses a hash scan to access the specified table. The syntax of the HASH hint is HASH(table) where table specifies the name or alias of the table to be accessed by a hash scan.
HASH_AJ The HASH_AJ hint transforms a NOT IN subquery into a hash anti-join to access the specified table. The syntax of the HASH_AJ hint is HASH_AJ(table) where table specifies the name or alias of the table to be accessed.(depricated in Oracle 10g)
INDEX The INDEX hint explicitly chooses an index scan for the specified table. The syntax of the INDEX hint is INDEX(table index) where:table specifies the name or alias of the table associated with the index to be scanned and index specifies an index on which an index scan is to be performed. This hint may optionally specify one or more indexes:
NO_INDEX The NO_INDEX hint explicitly disallows a set of indexes for the specified table. The syntax of the NO_INDEX hint is NO_INDEX(table index)
INDEX_ASC The INDEX_ASC hint explicitly chooses an index scan for the specified table. If the statement uses an index range scan, Oracle scans the index entries in ascending order of their indexed values.
INDEX_COMBINE If no indexes are given as arguments for the INDEX_COMBINE hint, the optimizer will use on the table whatever boolean combination of bitmap indexes has the best cost estimate. If certain indexes are given as arguments, the optimizer will try to use some boolean combination of those particular bitmap indexes. The syntax of INDEX_COMBINE is INDEX_COMBINE(table index).
INDEX_JOIN Explicitly instructs the optimizer to use an index join as an access path. For the hint to have a positive effect, a sufficiently small number of indexes must exist that contain all the columns required to resolve the query.
INDEX_DESC The INDEX_DESC hint explicitly chooses an index scan for the specified table. If the statement uses an index range scan, Oracle scans the index entries in descending order of their indexed values.
INDEX_FFS This hint causes a fast full index scan to be performed rather than a full table.
NO_INDEX_FFS Do not use fast full index scan (from Oracle 10g)
INDEX_SS Exclude range scan from query plan (from Oracle 10g)
INDEX_SS_ASC Exclude range scan from query plan (from Oracle 10g)
INDEX_SS_DESC Exclude range scan from query plan (from Oracle 10g)
NO_INDEX_SS The NO_INDEX_SS hint causes the optimizer to exclude a skip scan of the specified indexes on the specified table. (from Oracle 10g)

Hints for Query Transformations

NO_QUERY_TRANSFORMATION Prevents the optimizer performing query transformations. (from Oracle 10g)
USE_CONCAT The USE_CONCAT hint forces combined OR conditions in the WHERE clause of a query to be transformed into a compound query using the UNION ALL set operator. Normally, this transformation occurs only if the cost of the query using the concatenations is cheaper than the cost without them.
NO_EXPAND The NO_EXPAND hint prevents the optimizer from considering OR-expansion for queries having OR conditions or IN-lists in the WHERE clause. Usually, the optimizer considers using OR expansion and uses this method if it decides that the cost is lower than not using it.
REWRITE The REWRITE hint forces the optimizer to rewrite a query in terms of materialized views, when possible, without cost consideration. Use the REWRITE hint with or without a view list. If you use REWRITE with a view list and the list contains an eligible materialized view, then Oracle uses that view regardless of its cost.
NOREWRITE / NO_REWRITE In Oracle 10g renamed to NO_REWRITE. The NOREWRITE/NO_REWRITE hint disables query rewrite for the query block, overriding the setting of the parameter QUERY_REWRITE_ENABLED.
MERGE The MERGE hint lets you merge views in a query.
NO_MERGE The NO_MERGE hint causes Oracle not to merge mergeable views. This hint is most often used to reduce the number of possible permutations for a query and make optimization faster.
FACT The FACT hint indicated that the table should be considered as a fact table. This is used in the context of the star transformation.
NO_FACT The NO_FACT hint is used in the context of the star transformation to indicate to the transformation that the hinted table should not be considered as a fact table.
STAR_TRANSFORMATION The STAR_TRANSFORMATION hint makes the optimizer use the best plan in which the transformation has been used. Without the hint, the optimizer could make a query optimization decision to use the best plan generated without the transformation, instead of the best plan for the transformed query.
NO_STAR_TRANSFORMATION Do not use star transformation (from Oracle 10g)
UNNEST The UNNEST hint specifies subquery unnesting.
NO_UNNEST Use of the NO_UNNEST hint turns off unnesting for specific subquery blocks.

Hints for Join Orders

LEADING Give this hint to indicate the leading table in a join. This will indicate only 1 table. If you want to specify the whole order of tables, you can use the ORDERED hint. Syntax: LEADING(table)
ORDERED The ORDERED hint causes Oracle to join tables in the order in which they appear in the FROM clause. If you omit the ORDERED hint from a SQL statement performing a join , the optimizer chooses the order in which to join the tables. You may want to use the ORDERED hint to specify a join order if you know something about the number of rows selected from each table that the optimizer does not. Such information would allow you to choose an inner and outer table better than the optimizer could.

Hints for Join Operations

USE_NL The USE_NL hint causes Oracle to join each specified table to another row source with a nested loops join using the specified table as the inner table. The syntax of the USE_NL hint is USE_NL(table table) where table is the name or alias of a table to be used as the inner table of a nested loops join.
NO_USE_NL Do not use nested loop (from Oracle 10g)
USE_NL_WITH_INDEX Specifies a nested loops join. (from Oracle 10g)
USE_MERGE The USE_MERGE hint causes Oracle to join each specified table with another row source with a sort-merge join. The syntax of the USE_MERGE hint is USE_MERGE(table table) where table is a table to be joined to the row source resulting from joining the previous tables in the join order using a sort-merge join.
NO_USE_MERGE Do not use merge (from Oracle 10g)
USE_HASH The USE_HASH hint causes Oracle to join each specified table with another row source with a hash join. The syntax of the USE_HASH hint is USE_HASH(table table) where table is a table to be joined to the row source resulting from joining the previous tables in the join order using a hash join.
NO_USE_HASH Do not use hash (from Oracle 10g)
Hints for Parallel Execution
PARALLEL The PARALLEL hint allows you to specify the desired number of concurrent query servers that can be used for the query. The syntax is PARALLEL(table number number). The PARALLEL hint must use the table alias if an alias is specified in the query. The PARALLEL hint can then take two values separated by commas after the table name. The first value specifies the degree of parallelism for the given table, the second value specifies how the table is to be split among the instances of a parallel server. Specifying DEFAULT or no value signifies the query coordinator should examine the settings of the initialization parameters (described in a later section) to determine the default degree of parallelism.
NOPARALLEL / NO_PARALLEL The NOPARALLEL hint allows you to disable parallel scanning of a table, even if the table was created with a PARALLEL clause. In Oracle 10g this hint was renamed to NO_PARALLEL.
PQ_DISTRIBUTE The PQ_DISTRIBUTE hint improves the performance of parallel join operations. Do this by specifying how rows of joined tables should be distributed among producer and consumer query servers. Using this hint overrides decisions the optimizer would normally make.
NO_PARALLEL_INDEX The NO_PARALLEL_INDEX hint overrides a PARALLEL attribute setting on an index to avoid a parallel index scan operation.
Additional Hints
APPEND When the APPEND hint is used with the INSERT statement, data is appended to the table. Existing free space in the block is not used. If a table or an index is specified with nologging, this hint applied with an insert statement produces a direct path insert which reduces generation of redo.
NOAPPEND Overrides the append mode.
CACHE The CACHE hint specifies that the blocks retrieved for the table in the hint are placed at the most recently used end of the LRU list in the buffer cache when a full table scan is performed. This option is useful for small lookup tables. In the following example, the CACHE hint overrides the table default caching specification.
NOCACHE The NOCACHE hint specifies that the blocks retrieved for this table are placed at the least recently used end of the LRU list in the buffer cache when a full table scan is performed. This is the normal behavior of blocks in the buffer cache.
PUSH_PRED The PUSH_PRED hint forces pushing of a join predicate into the view.
NO_PUSH_PRED The NO_PUSH_PRED hint prevents pushing of a join predicate into the view.
PUSH_SUBQ The PUSH_SUBQ hint causes nonmerged subqueries to be evaluated at the earliest possible place in the execution plan.
NO_PUSH_SUBQ The NO_PUSH_SUBQ hint causes non-merged subqueries to be evaluated as the last step in the execution plan.
QB_NAME Specifies a name for a query block. (from Oracle 10g)
CURSOR_SHARING_EXACT Oracle can replace literals in SQL statements with bind variables, if it is safe to do so. This is controlled with the CURSOR_SHARING startup parameter. The CURSOR_SHARING_EXACT hint causes this behavior to be switched off. In other words, Oracle executes the SQL statement without any attempt to replace literals by bind variables.
DRIVING_SITE The DRIVING_SITE hint forces query execution to be done for the table at a different site than that selected by Oracle
DYNAMIC_SAMPLING The DYNAMIC_SAMPLING hint lets you control dynamic sampling to improve server performance by determining more accurate predicate selectivity and statistics for tables and indexes. You can set the value of DYNAMIC_SAMPLING to a value from 0 to 10. The higher the level, the more effort the compiler puts into dynamic sampling and the more broadly it is applied. Sampling defaults to cursor level unless you specify a table.
SPREAD_MIN_ANALYSIS This hint omits some of the compile time optimizations of the rules, mainly detailed dependency graph analysis, on spreadsheets. Some optimizations such as creating filters to selectively populate spreadsheet access structures and limited rule pruning are still used. (from Oracle 10g)

Hints with unknown status

MERGE_AJ The MERGE_AJ hint transforms a NOT IN subquery into a merge anti-join to access the specified table. The syntax of the MERGE_AJ hint is MERGE_AJ(table) where table specifies the name or alias of the table to be accessed.(depricated in Oracle 10g)
AND_EQUAL The AND_EQUAL hint explicitly chooses an execution plan that uses an access path that merges the scans on several single-column indexes. The syntax of the AND_EQUAL hint is AND_EQUAL(table index index) where table specifies the name or alias of the table associated with the indexes to be merged. and index specifies an index on which an index scan is to be performed. You must specify at least two indexes. You cannot specify more than five. (depricated in Oracle 10g)
STAR The STAR hint forces the large table to be joined last using a nested loops join on the index. The optimizer will consider different permutations of the small tables. (depricated in Oracle 10g)
BITMAP Usage: BITMAP(table_name index_name) Uses a bitmap index to access the table. (depricated ?)
HASH_SJ
Use a Hash Anti-Join to evaluate a NOT IN sub-query. Use this hint in the sub-query, not in the main query. Use this when your high volume NOT IN sub-query is using a FILTER or NESTED LOOPS join. Try MERGE_AJ if HASH_AJ refuses to work.(depricated in Oracle 10g)
NL_SJ Use a Nested Loop in a sub-query. (depricated in Oracle 10g)
NL_AJ Use an anti-join in a sub-query. (depricated in Oracle 10g)
ORDERED_PREDICATES (depricated in Oracle 10g)
EXPAND_GSET_TO_UNION (depricated in Oracle 10g)


鍙傝冭嚦錛氥婅Oracle璺戝緱鏇村揩銆嬭礙鎬榪滆憲



Rabbit 2013-11-08 14:44 鍙戣〃璇勮
]]>
oracle table-lock鐨?縐嶆ā寮?/title><link>http://www.tkk7.com/rabbit/archive/2013/11/05/406007.html</link><dc:creator>Rabbit</dc:creator><author>Rabbit</author><pubDate>Tue, 05 Nov 2013 06:31:00 GMT</pubDate><guid>http://www.tkk7.com/rabbit/archive/2013/11/05/406007.html</guid><wfw:comment>http://www.tkk7.com/rabbit/comments/406007.html</wfw:comment><comments>http://www.tkk7.com/rabbit/archive/2013/11/05/406007.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.tkk7.com/rabbit/comments/commentRss/406007.html</wfw:commentRss><trackback:ping>http://www.tkk7.com/rabbit/services/trackbacks/406007.html</trackback:ping><description><![CDATA[<span style="color: #4b4b4b; font-family: Verdana, Geneva, Arial, Helvetica, sans-serif; font-size: 13px; line-height: 19px; font-weight: bold;">Oracle涓殑閿佸畾鍙互鍒嗕負鍑犵被錛?/span><br style="color: #4b4b4b; font-family: Verdana, Geneva, Arial, Helvetica, sans-serif; font-size: 13px; line-height: 19px;" /><span style="color: #4b4b4b; font-family: Verdana, Geneva, Arial, Helvetica, sans-serif; font-size: 13px; line-height: 19px; background-color: #ffffff;">1銆丏ML lock錛坉ata lock錛夛紝</span><br style="color: #4b4b4b; font-family: Verdana, Geneva, Arial, Helvetica, sans-serif; font-size: 13px; line-height: 19px;" /><span style="color: #4b4b4b; font-family: Verdana, Geneva, Arial, Helvetica, sans-serif; font-size: 13px; line-height: 19px; background-color: #ffffff;">2銆丏DL lock錛坉ictionary lock)</span><br style="color: #4b4b4b; font-family: Verdana, Geneva, Arial, Helvetica, sans-serif; font-size: 13px; line-height: 19px;" /><span style="color: #4b4b4b; font-family: Verdana, Geneva, Arial, Helvetica, sans-serif; font-size: 13px; line-height: 19px; background-color: #ffffff;">3銆乮nternal lock/latch銆?/span><br style="color: #4b4b4b; font-family: Verdana, Geneva, Arial, Helvetica, sans-serif; font-size: 13px; line-height: 19px;" /><br style="color: #4b4b4b; font-family: Verdana, Geneva, Arial, Helvetica, sans-serif; font-size: 13px; line-height: 19px;" /><span style="color: #4b4b4b; font-family: Verdana, Geneva, Arial, Helvetica, sans-serif; font-size: 13px; line-height: 19px; background-color: #ffffff;">DML lock鍙堝彲浠ュ垎涓簉ow lock鍜宼able lock銆俽ow lock鍦╯elect.. for update/insert/update/delete鏃墮殣寮忚嚜鍔ㄤ駭鐢燂紝鑰宼able lock闄や簡闅愬紡浜х敓錛屼篃鍙互璋冪敤lock table <table_name> in </table_name> name鏉ユ樉紺洪攣瀹氥?/span><br style="color: #4b4b4b; font-family: Verdana, Geneva, Arial, Helvetica, sans-serif; font-size: 13px; line-height: 19px;" /><br style="color: #4b4b4b; font-family: Verdana, Geneva, Arial, Helvetica, sans-serif; font-size: 13px; line-height: 19px;" /><span style="color: #4b4b4b; font-family: Verdana, Geneva, Arial, Helvetica, sans-serif; font-size: 13px; line-height: 19px; background-color: #ffffff;">濡傛灉涓嶅笇鏈涘埆鐨剆ession lock/insert/update/delete琛ㄤ腑浠繪剰涓琛岋紝鍙厑璁告煡璇紝鍙互鐢╨ock table table_name in exclusive mode銆?X)榪欎釜閿佸畾妯″紡綰у埆鏈楂橈紝騫跺彂搴︽渶灝忋?/span><br style="color: #4b4b4b; font-family: Verdana, Geneva, Arial, Helvetica, sans-serif; font-size: 13px; line-height: 19px;" /><br style="color: #4b4b4b; font-family: Verdana, Geneva, Arial, Helvetica, sans-serif; font-size: 13px; line-height: 19px;" /><span style="color: #4b4b4b; font-family: Verdana, Geneva, Arial, Helvetica, sans-serif; font-size: 13px; line-height: 19px; background-color: #ffffff;">濡傛灉鍏佽鍒殑session鏌ヨ鎴栫敤select for update閿佸畾璁板綍錛屼笉鍏佽insert/update/delete錛屽彲浠ョ敤</span><br style="color: #4b4b4b; font-family: Verdana, Geneva, Arial, Helvetica, sans-serif; font-size: 13px; line-height: 19px;" /><span style="font-family: Verdana, Geneva, Arial, Helvetica, sans-serif; font-size: 13px; line-height: 19px; color: red;">lock table table_name in share row exclusive mode銆?SRX)</span><br style="color: #4b4b4b; font-family: Verdana, Geneva, Arial, Helvetica, sans-serif; font-size: 13px; line-height: 19px;" /><br style="color: #4b4b4b; font-family: Verdana, Geneva, Arial, Helvetica, sans-serif; font-size: 13px; line-height: 19px;" /><span style="color: #4b4b4b; font-family: Verdana, Geneva, Arial, Helvetica, sans-serif; font-size: 13px; line-height: 19px; background-color: #ffffff;">濡傛灉鍏佽鍒殑session鏌ヨ鎴杝elect for update浠ュ強lock table table_name in share mode錛屽彧鏄笉鍏佽insert/update/delete錛屽彲浠ョ敤</span><br style="color: #4b4b4b; font-family: Verdana, Geneva, Arial, Helvetica, sans-serif; font-size: 13px; line-height: 19px;" /><span style="color: #4b4b4b; font-family: Verdana, Geneva, Arial, Helvetica, sans-serif; font-size: 13px; line-height: 19px; background-color: #ffffff;">lock table table_name in share mode銆?share mode鍜宻hare row exclusive mode鐨勫尯鍒湪浜庝竴涓槸闈炴姠鍗犲紡鐨勮屽彟涓涓槸鎶㈠崰寮忕殑銆傝繘鍏hare row exclusive mode鍚庡叾浠杝ession涓嶈兘闃繪浣爄nsert/update/delete錛岃岃繘鍏hare mode鍚庡叾浠杝ession涔熷悓鏍峰彲浠ヨ繘鍏hare mode錛岃繘鑰岄樆姝綘瀵硅〃鐨勪慨鏀廣?S)</span><br style="color: #4b4b4b; font-family: Verdana, Geneva, Arial, Helvetica, sans-serif; font-size: 13px; line-height: 19px;" /><br style="color: #4b4b4b; font-family: Verdana, Geneva, Arial, Helvetica, sans-serif; font-size: 13px; line-height: 19px;" /><span style="color: #4b4b4b; font-family: Verdana, Geneva, Arial, Helvetica, sans-serif; font-size: 13px; line-height: 19px; background-color: #ffffff;">榪樻湁涓ょ閿佸畾妯″紡錛宺ow share(RS)鍜宺ow exclusive(RX)銆備粬浠厑璁哥殑騫跺彂鎿嶄綔鏇村錛屼竴鑸洿鎺ョ敤DML璇彞鑷姩鑾峰緱錛岃屼笉鐢╨ock璇彞銆?/span><br style="color: #4b4b4b; font-family: Verdana, Geneva, Arial, Helvetica, sans-serif; font-size: 13px; line-height: 19px;" /><span style="color: #4b4b4b; font-family: Verdana, Geneva, Arial, Helvetica, sans-serif; font-size: 13px; line-height: 19px; background-color: #ffffff;">璇︾粏鍙傝僣oncepts鏂囨。涓殑"Type Of Locks"錛?/span><br style="color: #4b4b4b; font-family: Verdana, Geneva, Arial, Helvetica, sans-serif; font-size: 13px; line-height: 19px;" /><span style="color: #4b4b4b; font-family: Verdana, Geneva, Arial, Helvetica, sans-serif; font-size: 13px; line-height: 19px; background-color: #ffffff;">http://download-uk.oracle.com/docs/cd/B10501_01/server.920/a96524/c21cnsis.htm#2937 </span><br style="color: #4b4b4b; font-family: Verdana, Geneva, Arial, Helvetica, sans-serif; font-size: 13px; line-height: 19px;" /><br style="color: #4b4b4b; font-family: Verdana, Geneva, Arial, Helvetica, sans-serif; font-size: 13px; line-height: 19px;" /><br style="color: #4b4b4b; font-family: Verdana, Geneva, Arial, Helvetica, sans-serif; font-size: 13px; line-height: 19px;" /><span style="color: #4b4b4b; font-family: Verdana, Geneva, Arial, Helvetica, sans-serif; font-size: 13px; line-height: 19px; background-color: #ffffff;">-------------------------------------</span><br style="color: #4b4b4b; font-family: Verdana, Geneva, Arial, Helvetica, sans-serif; font-size: 13px; line-height: 19px;" /><span style="font-weight: bold;">鎬庝箞unlock table 瑙i攣</span><br style="color: #4b4b4b; font-family: Verdana, Geneva, Arial, Helvetica, sans-serif; font-size: 13px; line-height: 19px;" /><br style="color: #4b4b4b; font-family: Verdana, Geneva, Arial, Helvetica, sans-serif; font-size: 13px; line-height: 19px;" /><span style="color: #4b4b4b; font-family: Verdana, Geneva, Arial, Helvetica, sans-serif; font-size: 13px; line-height: 19px; font-weight: bold;">鏂規硶涓銆乲ill session錛?/span><br style="color: #4b4b4b; font-family: Verdana, Geneva, Arial, Helvetica, sans-serif; font-size: 13px; line-height: 19px;" /><br style="color: #4b4b4b; font-family: Verdana, Geneva, Arial, Helvetica, sans-serif; font-size: 13px; line-height: 19px;" /><span style="color: #4b4b4b; font-family: Verdana, Geneva, Arial, Helvetica, sans-serif; font-size: 13px; line-height: 19px; background-color: #ffffff;">SQL> select object_id,session_id from v$locked_object;  //娉ㄦ剰session_id 灝辨槸涓婇攣鐨?session鏍囧織</span><br style="color: #4b4b4b; font-family: Verdana, Geneva, Arial, Helvetica, sans-serif; font-size: 13px; line-height: 19px;" /><span style="color: #4b4b4b; font-family: Verdana, Geneva, Arial, Helvetica, sans-serif; font-size: 13px; line-height: 19px; background-color: #ffffff;">SQL> select username,sid,SERIAL#  from v$session where sid=銆傘?      //榪欓噷鐨凷ID = session_id </span><br style="color: #4b4b4b; font-family: Verdana, Geneva, Arial, Helvetica, sans-serif; font-size: 13px; line-height: 19px;" /><span style="color: #4b4b4b; font-family: Verdana, Geneva, Arial, Helvetica, sans-serif; font-size: 13px; line-height: 19px; background-color: #ffffff;">SQL> alter system kill session 'id,serial#';     //鏉姝昏session</span><br style="color: #4b4b4b; font-family: Verdana, Geneva, Arial, Helvetica, sans-serif; font-size: 13px; line-height: 19px;" /><br style="color: #4b4b4b; font-family: Verdana, Geneva, Arial, Helvetica, sans-serif; font-size: 13px; line-height: 19px;" /><span style="color: #4b4b4b; font-family: Verdana, Geneva, Arial, Helvetica, sans-serif; font-size: 13px; line-height: 19px; font-weight: bold;">鏂規硶浜屻乺ollback/commit 緇堟浜嬪姟澶勭悊<br /><br /><br /></span><a style="word-wrap: break-word; color: #19599b; font-family: 寰蔣闆呴粦, 榛戜綋, Verdana; font-size: 20px; background-color: #ffffff;">ORACLE 澶ц〃寤虹珛绱㈠紩鐨勪竴浜涜冭檻</a><span style="color: #565656; font-family: 瀹嬩綋, Arial; font-size: 12px; line-height: 12px; background-color: #ffffff;"> </span><br /><span style="color: #4b4b4b; font-family: Verdana, Geneva, Arial, Helvetica, sans-serif; font-size: 13px; line-height: 19px; font-weight: bold;"><br /></span><span style="color: #666666; font-family: 瀹嬩綋, Arial; font-size: 12px; line-height: 26px; background-color: #ffffff;">棣栧厛錛?/span><strong style="word-wrap: break-word; color: #666666; font-family: 瀹嬩綋, Arial; font-size: 12px; line-height: 26px; background-color: #ffffff;">搴斿綋鑰冭檻琛ㄧ┖闂村拰紓佺洏絀洪棿鏄惁瓚沖</strong><span style="color: #666666; font-family: 瀹嬩綋, Arial; font-size: 12px; line-height: 26px; background-color: #ffffff;">銆傛垜浠煡閬撶儲寮曚篃鏄竴縐嶆暟鎹紝鍦ㄥ緩绔嬬儲寮曠殑鏃跺欏娍蹇呬篃浼氬崰鐢ㄥぇ閲忚〃絀洪棿銆傚洜姝ゅ湪瀵逛竴寮犲ぇ琛ㄥ緩绔嬬儲寮曠殑鏃跺欓鍏堝簲褰撹冭檻鐨勬槸絀洪棿瀹歸噺闂銆?/span><br style="word-wrap: break-word; color: #666666; font-family: 瀹嬩綋, Arial; font-size: 12px; line-height: 26px; background-color: #ffffff;" /><span style="color: #666666; font-family: 瀹嬩綋, Arial; font-size: 12px; line-height: 26px; background-color: #ffffff;">鍏舵錛屽湪瀵瑰緩绔嬬儲寮曠殑鏃跺欒瀵硅〃榪涜鍔犻攣錛屽洜姝ゅ簲褰撴敞鎰?/span><strong style="word-wrap: break-word; color: #666666; font-family: 瀹嬩綋, Arial; font-size: 12px; line-height: 26px; background-color: #ffffff;">鎿嶄綔鍦ㄤ笟鍔$┖闂茬殑鏃跺欒繘琛?/strong><span style="color: #666666; font-family: 瀹嬩綋, Arial; font-size: 12px; line-height: 26px; background-color: #ffffff;">銆?/span><br style="word-wrap: break-word; color: #666666; font-family: 瀹嬩綋, Arial; font-size: 12px; line-height: 26px; background-color: #ffffff;" /><strong style="word-wrap: break-word; color: #666666; font-family: 瀹嬩綋, Arial; font-size: 12px; line-height: 26px; background-color: #ffffff;"><em style="word-wrap: break-word;">鎬ц兘璋冩暣鏂規硶錛?/em></strong><br style="word-wrap: break-word; color: #666666; font-family: 瀹嬩綋, Arial; font-size: 12px; line-height: 26px; background-color: #ffffff;" /><font color="#0000F0" style="word-wrap: break-word; font-family: 瀹嬩綋, Arial; font-size: 12px; line-height: 26px; background-color: #ffffff;">棣栧厛搴旇冭檻IO錛?鐗╃悊涓婏紝搴斿綋灝介噺鎶婄儲寮曚笌鏁版嵁鍒嗘暎鍒頒笉鍚岀殑紓佺洏涓娿?閫昏緫涓婏紝鏁版嵁琛ㄧ┖闂翠笌绱㈠紩琛ㄧ┖闂村垎寮銆傝繖鏄湪寤虹儲寮曟椂搴斿綋灝婂畧鐨勫熀鏈師鍒?/font><span style="color: #666666; font-family: 瀹嬩綋, Arial; font-size: 12px; line-height: 26px; background-color: #ffffff;">銆?/span><br style="word-wrap: break-word; color: #666666; font-family: 瀹嬩綋, Arial; font-size: 12px; line-height: 26px; background-color: #ffffff;" /><span style="color: #666666; font-family: 瀹嬩綋, Arial; font-size: 12px; line-height: 26px; background-color: #ffffff;">鍏舵錛?/span><font color="#0000F0" style="word-wrap: break-word; font-family: 瀹嬩綋, Arial; font-size: 12px; line-height: 26px; background-color: #ffffff;">鍦ㄥ緩绔嬬儲寮曠殑鏃跺欒瀵硅〃榪涜鍏ㄨ〃鐨勬壂鎻忓伐浣?/font><span style="color: #666666; font-family: 瀹嬩綋, Arial; font-size: 12px; line-height: 26px; background-color: #ffffff;">錛屽洜姝わ紝搴斿綋鑰冭檻璋冨ぇ鍒濆鍖栧弬鏁?/span><font color="#0000F0" style="word-wrap: break-word; font-family: 瀹嬩綋, Arial; font-size: 12px; line-height: 26px; background-color: #ffffff;">db_file_multiblock_read_count鐨勫箋備竴鑸緗負16鎴栨洿澶?/font><span style="color: #666666; font-family: 瀹嬩綋, Arial; font-size: 12px; line-height: 26px; background-color: #ffffff;">銆?/span><br style="word-wrap: break-word; color: #666666; font-family: 瀹嬩綋, Arial; font-size: 12px; line-height: 26px; background-color: #ffffff;" /><span style="color: #666666; font-family: 瀹嬩綋, Arial; font-size: 12px; line-height: 26px; background-color: #ffffff;">鍐?嬈★紝</span><font color="#0000F0" style="word-wrap: break-word; font-family: 瀹嬩綋, Arial; font-size: 12px; line-height: 26px; background-color: #ffffff;">寤虹珛绱㈠紩闄や簡瑕佽繘琛屽叏琛ㄦ壂鎻忓鍚屾椂榪樿瀵規暟鎹繘琛屽ぇ閲忕殑鎺掑簭鎿嶄綔</font><span style="color: #666666; font-family: 瀹嬩綋, Arial; font-size: 12px; line-height: 26px; background-color: #ffffff;">錛屽洜姝わ紝搴斿綋璋冩暣鎺掑簭鍖虹殑澶у皬銆傚湪9I涔嬪墠錛?鍙互鍦⊿ESSION綰у埆涓婂姞澶ort_area_size 鐨勫ぇ灝忥紝 姣斿璁劇疆涓?00M鎴栬呮洿澶с?I 浠ュ悗錛?濡傛灉</span><font color="#0000F0" style="word-wrap: break-word; font-family: 瀹嬩綋, Arial; font-size: 12px; line-height: 26px; background-color: #ffffff;">鍒濆鍖栧弬鏁皐orkarea_size_policy鐨勫間負TRUE錛?鍒欐帓搴忓尯浠嶱GA_AGGREGATE_TARGET閲岃嚜鍔ㄥ垎閰嶈幏寰?/font><br /><span style="color: #4b4b4b; font-family: Verdana, Geneva, Arial, Helvetica, sans-serif; font-size: 13px; line-height: 19px; font-weight: bold;"><br /><br /></span><img src ="http://www.tkk7.com/rabbit/aggbug/406007.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.tkk7.com/rabbit/" target="_blank">Rabbit</a> 2013-11-05 14:31 <a href="http://www.tkk7.com/rabbit/archive/2013/11/05/406007.html#Feedback" target="_blank" style="text-decoration:none;">鍙戣〃璇勮</a></div>]]></description></item><item><title>浣跨敤 EclEmma 榪涜瑕嗙洊嫻嬭瘯http://www.tkk7.com/rabbit/archive/2013/11/01/405872.htmlRabbitRabbitFri, 01 Nov 2013 01:43:00 GMThttp://www.tkk7.com/rabbit/archive/2013/11/01/405872.htmlhttp://www.tkk7.com/rabbit/comments/405872.htmlhttp://www.tkk7.com/rabbit/archive/2013/11/01/405872.html#Feedback0http://www.tkk7.com/rabbit/comments/commentRss/405872.htmlhttp://www.tkk7.com/rabbit/services/trackbacks/405872.html瑕嗙洊嫻嬭瘯鏄 閲忔祴璇曡川閲忕殑涓涓噸瑕佹寚鏍囥傚湪瀵逛竴涓蔣浠朵駭鍝佽繘琛屼簡鍗曞厓嫻嬭瘯銆佺粍瑁呮祴璇曘侀泦鎴愭祴璇曚互鍙婃帴鍙楁祴璇曠瓑綣佸鐨勬祴璇曚箣鍚庯紝鎴戜滑鑳戒笉鑳藉氨姝ゅ杞歡鐨勮川閲忎駭鐢熶竴瀹氱殑淇″績鍛紵榪欏氨闇瑕佹垜浠嫻嬭瘯鐨勮川閲忚繘琛岃冨療銆傚鏋滄祴璇曚粎瑕嗙洊浜嗕唬鐮佺殑涓灝忛儴鍒嗭紝閭d箞涓嶇鎴戜滑鍐欎簡澶氬皯嫻嬭瘯鐢ㄤ緥錛屾垜浠篃涓嶈兘鐩鎬俊杞歡璐ㄩ噺鏄湁淇濊瘉鐨勩傜浉鍙嶏紝濡傛灉嫻嬭瘯瑕嗙洊鍒頒簡杞歡鐨勭粷澶ч儴鍒嗕唬鐮侊紝鎴戜滑灝辮兘瀵硅蔣浠剁殑璐ㄩ噺鏈変竴涓悎鐞嗙殑淇″績銆傛湰鏂囧皢浠嬬粛涓涓紭縐鐨勫紑婧愯蔣浠舵祴璇曞伐鍏?EclEmma錛屽畠鑳藉瀵圭敱 Java 璇█緙栧啓鐨勭▼搴忚繘琛岃鐩栨祴璇曪紝浠庤屽紼嬪簭榪愯鐨勭粨鏋滅敓鎴愯灝界殑瑕嗙洊嫻嬭瘯鎶ュ憡銆?/p>

浠嬬粛

鐜板湪 IT 寮鍙戜漢鍛樻瘮浠ュ線浠諱綍鏃跺欓兘鏇村姞鍏蟲敞嫻嬭瘯鐨勯噸瑕佹э紝娌℃湁緇忚繃鑹ソ嫻嬭瘯鐨勪唬鐮佹洿瀹規槗鍑洪棶棰樸傚湪鏋侀檺緙栫▼涓紝嫻嬭瘯椹卞姩寮鍙戝凡緇忚璇佹槑鏄竴縐嶆湁鏁堟彁楂樿蔣浠惰川閲忕殑鏂規硶銆傚湪嫻嬭瘯椹卞姩鐨勫紑鍙戞柟寮忎腑錛岃蔣浠跺伐紼嬪笀鍦ㄧ紪鍐欏姛鑳戒唬鐮佷箣鍓嶉鍏堢紪鍐欐祴璇曚唬鐮侊紝榪欐牱鑳戒粠鏈寮濮嬩繚璇佺▼搴忎唬鐮佺殑姝g‘鎬э紝騫朵笖鑳藉鍦ㄧ▼搴忕殑姣忔婕旇繘鏃惰繘琛岃嚜鍔ㄧ殑鍥炲綊嫻嬭瘯銆傛祴璇曞浜庤蔣浠朵駭鍝佺殑鎴愯觸璧風潃鑷沖叧閲嶈鐨勪綔鐢紝鍦ㄦ瀬闄愮紪紼嬮鍩燂紝鐢氳嚦鏈変漢鎻愯浠諱綍鏈粡嫻嬭瘯鐨勪唬鐮侀兘搴旇鑷姩浠庡彂甯冪殑浜у搧涓垹闄ゃ備綔鑰呭茍涓嶇‘淇¤繖涓鐐規槸姝g‘鐨勶紝浣嗘槸嫻嬭瘯鏈韓鐨勮川閲忕‘瀹炴槸涓涓渶瑕侀珮搴﹀叧娉ㄧ殑闂銆傛祴璇曠殑瑕嗙洊鐜囨槸嫻嬭瘯璐ㄩ噺鐨勪竴涓噸瑕佹寚鏍囷紝鎴戜滑闇瑕佸伐鍏鋒潵甯姪鎴戜滑榪涜瀵硅蔣浠舵祴璇曡鐩栫殑鑰冨療銆?/p>

EclEmma 灝辨槸榪欐牱涓涓兘甯姪寮鍙戜漢鍛樿冨療嫻嬭瘯瑕嗙洊鐜囩殑浼樼鐨?Eclipse 寮婧愭彃浠躲侲clEmma 鍦ㄨ鐩栨祴璇曢鍩熸槸濡傛鐨勪紭縐錛屼互鑷翠簬瀹冨湪榪囧幓涓嶄箙鐨?2006 騫存垚涓轟簡 Eclipse Community Awards Winners 鍐寵禌閫夋墜銆傝櫧鐒舵渶鍚?Eclipse Checkstyle Plugin 鍙栧緱浜?Best Open Source Eclipse-based Developer tool 鐨勭О鍙鳳紝浣嗘垜浠篃鍙互鐢辨鐪嬪埌 EclEmma 瀵瑰紑鍙戜漢鍛樼殑甯姪鏄法澶х殑錛圗clipse Community Award 鐨勫叿浣撲俊鎭彲浠ュ弬闃?鍙傝冭祫婧?/a>錛夈?/p>

鎻愬埌 EclEmma 棣栧厛灝辮璇村埌钁楀悕鐨?Java 瑕嗙洊嫻嬭瘯宸ュ叿 Emma銆侲mma 鏄竴涓湪 SourceForge 涓婅繘琛岀殑寮婧愰」鐩紙鍙傞槄 鍙傝冭祫婧?/a>錛夈備粠鏌愮紼嬪害涓婅錛孍clEmma 鍙互鐪嬩綔鏄?Emma 鐨勪竴涓浘褰㈢晫闈€傚湪鏈枃鐨?a >鍙傝冩枃鐚?/a>涓紝鍙互鐪嬪埌涓撻棬璁茶堪浣跨敤 Emma 鐨勬妧鏈枃绔犮?/p>

Emma 鐨勪綔鑰呭紑鍙?Emma 涔嬪垵錛岀▼搴忓憳宸茬粡鏈変簡鍚勭鍚勬牱浼樼鐨勫紑婧?Java 寮鍙戝伐鍏楓備婦渚嬫潵璇達紝鎴戜滑鏈変紭縐鐨勯泦鎴愬紑鍙戠幆澧?Eclipse錛屾湁寮婧愮殑 JDK錛屾湁鍗曞厓嫻嬭瘯宸ュ叿 JUnit錛屾湁 Ant 榪欐牱鐨勯」鐩鐞嗗伐鍏鳳紝鎴戜滑榪樺彲浠ョ敤 CVS 鎴?SubVersion 鏉ヨ繘琛屾簮浠g爜鐗堟湰鐨勭淮鎶ゃ傚綋鏃剁湅鏉ワ紝涔熻鍞竴緙哄皯鐨勫氨鏄竴涓紑婧愮殑瑕嗙洊嫻嬭瘯宸ュ叿浜嗐侲mma 灝辨槸涓轟簡濉ˉ榪欓」絀虹櫧鑰岀敓鐨勩傜幇鍦ㄧ殑鎯呭喌宸茬粡鍜?Emma 璇炵敓鐨勬椂鍊欎笉涓鏍風殑銆傛椂鑷充粖鏃ワ紝鎴戜滑宸茬粡鏈変簡涓嶅皯鐨勮鐩栨祴璇曞伐鍏楓備緥濡?Coverlipse 鏄竴涓熀浜?Eclipse 鐨勮鐩栨祴璇曟彃浠躲傚叾浠栬繕鏈?Cobertura錛孮uilt 鍜?JCoverage 絳夈備絾鏄?Emma 鍏鋒湁涓浜涢潪甯鎬紭縐鐨勭壒鎬т嬌寰楀畠鏇撮傚悎琚箍娉涚殑浣跨敤銆傚拰 Coverlipse 絳夊伐鍏鋒瘮璧鋒潵錛孍mma 鏄紑婧愮殑錛屽悓鏃跺畠瀵瑰簲鐢ㄧ▼搴忔墽琛岄熷害鐨勫獎鍝嶉潪甯稿皬銆?/p>

EclEmma 鐨勫嚭鐜板譏琛ヤ簡 Emma 鐢ㄦ埛涓涓ぇ鐨勯仐鎲?---- 緙轟箯鍥懼艦鐣岄潰浠ュ強瀵歸泦鎴愬紑鍙戠幆澧冪殑鏀寔銆傚皢 Eclipse 鍜?Emma 榪欎袱涓湪鍚勮嚜棰嗗煙鏈涓轟紭縐鐨勫伐鍏風粨鍚堣搗鏉ワ紝榪欏氨鏄?EclEmma 涓烘垜浠彁渚涚殑銆傛帴涓嬫潵錛屾垜浠氨瑕佸湪鍚庣畫绔犺妭涓拰璇昏呮湅鍙嬩竴璧風湅鐪?EclEmma 涓哄紑鍙戜漢鍛樻彁渚涗簡浠涔堛?/p>

瀹夎 EclEmma 鎻掍歡

瀹夎 EclEmma 鎻掍歡鐨勮繃紼嬪拰澶ч儴鍒?Eclipse 鎻掍歡鐩稿悓錛屾垜浠棦鍙互閫氳繃 Eclipse 鏍囧噯鐨?Update 鏈哄埗鏉ヨ繙紼嬪畨瑁?EclEmma 鎻掍歡錛?a >鍥?1錛夛紝涔熷彲浠ヤ粠绔欑偣錛堝弬闃?鍙傝冭祫婧?/a>錛変笅杞?zip 鏂囦歡騫惰В鍘嬪埌 eclipse 鎵鍦ㄧ殑鐩綍涓?/p>

鍥?1 娣誨姞 EclEmma 鏇存柊绔欑偣
鍥?1 娣誨姞 EclEmma 鏇存柊绔欑偣

涓嶇閲囩敤浣曠鏂瑰紡鏉ュ畨瑁?EclEmma錛屽畨瑁呭畬鎴愬茍閲嶆柊鍚姩 Eclipse 涔嬪悗錛屽伐鍏鋒爮涓婂簲璇ュ嚭鐜頒竴涓柊鐨勬寜閽細

鍥?2 鏂板鐨勮鐩栨祴璇曟寜閽?/h5>鍥?2 鏂板鐨勮鐩栨祴璇曟寜閽? src=

浣跨敤 EclEmma 嫻嬭瘯 Java 紼嬪簭

涓轟簡瀹為獙 EclEmma 鐨勭壒鎬э紝鎴戜滑棣栧厛鍦?Eclipse 鐨?Workspace 涓緩绔嬩竴涓悕縐頒負 test.emma 鐨勬柊 Java 欏圭洰銆傛帴涓嬫潵錛屾垜浠湪鍏朵腑寤虹珛涓涓?HelloWorld 綾伙紝鍏朵唬鐮佸涓嬫墍紺猴細

娓呭崟 1 鐢ㄤ簬嫻嬭瘯 EclEmma 鐨勪唬鐮?/h5>
package test.emma;

public class HelloWorld {

	/**
	 * @param args
	 */
	public static void main(String[] args) {
		int rand = (int) (Math.random()*100);
		if(rand%2==0){
			System.out.println( "Hello, world! 0");
		}
		else
			System.out.println("Hello, world! 1");
		
		int result = rand%2==0? rand+rand:rand*rand; 
		System.out.println(result);
	}
}

鎺ヤ笅鏉ワ紝鎴戜滑閫氳繃 EclEmma 榪愯 HelloWorld.main() 鍑芥暟銆?/p>

鍥?3 瀵?Java 搴旂敤紼嬪簭榪涜瑕嗙洊嫻嬭瘯
鍥?3 瀵?Java 搴旂敤紼嬪簭榪涜瑕嗙洊嫻嬭瘯

鎵ц瀹屾瘯涔嬪悗錛屾垜浠鍦ㄧ紪杈?HelloWorld.java 鐨勭獥鍙e皢浼氬彉鎴愬涓嬫墍紺猴細

鍥?4 榪涜瑕嗙洊嫻嬭瘯鐨勭粨鏋?/h5>鍥?4 榪涜瑕嗙洊嫻嬭瘯鐨勭粨鏋? src=

鍦?Java 緙栬緫鍣ㄤ腑錛孍clEmma 鐢ㄤ笉鍚岀殑鑹插僵鏍囩ず浜嗘簮浠g爜鐨勬祴璇曟儏鍐點傚叾涓紝緇胯壊鐨勮琛ㄧず璇ヨ浠g爜琚畬鏁寸殑鎵ц錛岀孩鑹查儴鍒嗚〃紺鴻琛屼唬鐮佹牴鏈病鏈夎鎵ц錛岃岄粍鑹茬殑琛岃〃鏄庤琛屼唬鐮侀儴鍒嗚鎵ц銆傞粍鑹茬殑琛岄氬父鍑虹幇鍦ㄥ崟琛屼唬鐮佸寘鍚垎鏀殑鎯呭喌錛屼緥濡?鍥?4 涓殑 16 琛屽氨鏄劇ず涓洪粍鑹層傜敱浜庣▼搴忎腑鏈変竴涓殢鏈虹‘瀹氱殑鍒嗘敮錛屽洜姝よ鑰呯殑紿楀彛鍙兘涓庤繖閲岀◢鏈変笉鍚岋紙11 琛屾垨鑰?14 琛屼腑鏈変笖鍙湁涓涓孩鑹茬殑琛岋級銆?/p>

闄や簡鍦ㄦ簮浠g爜緙栬緫紿楀彛鐩存帴榪涜鐫鑹蹭箣澶栵紝EclEmma 榪樻彁渚涗簡涓涓崟鐙殑瑙嗗浘鏉ョ粺璁$▼搴忕殑瑕嗙洊嫻嬭瘯鐜囥?/p>

鍥?5 瀵熺湅紼嬪簭鐨勮鐩栨祴璇曠巼
鍥?5 瀵熺湅紼嬪簭鐨勮鐩栨祴璇曠巼

EclEmma 鎻愪緵鐨?Coverage 瑙嗗浘鑳藉鍒嗗眰鐨勬樉紺轟唬鐮佺殑瑕嗙洊嫻嬭瘯鐜囷紝鍥?5 涓殑淇℃伅琛ㄦ槑鎴戜滑瀵?HelloWorld 鐨勪竴嬈¤繍琛岃鐩栦簡澶х害 68.6% 鐨勪唬鐮併?/p>

鎯沖湪涓嬈¤繍琛屼腑瑕嗙洊鎵鏈夌殑浠g爜閫氬父姣旇緝鍥伴毦錛屽鏋滆兘鎶婂嬈℃祴璇曠殑瑕嗙洊鏁版嵁緇煎悎璧鋒潵榪涜瀵熺湅錛岄偅涔堟垜浠氨鑳芥洿鏂逛究鐨勬帉鎻″嬈℃祴璇曠殑嫻嬭瘯鏁堟灉銆侲clEmma 鎻愪緵浜嗚繖鏍風殑鍔熻兘銆傜幇鍦紝璁╂垜浠噸澶嶆暟嬈″ HelloWorld 鐨勮鐩栨祴璇曘傛垜浠敞鎰忓埌 Coverage 瑙嗗浘鎬繪槸鏄劇ず鏈鏂板畬鎴愮殑涓嬈¤鐩栨祴璇曘備簨瀹炰笂錛孍clEmma 涓烘垜浠繚瀛樹簡鎵鏈夌殑嫻嬭瘯緇撴灉銆傛帴涓嬫潵錛屾垜浠皢閫氳繃 Coverage 瑙嗗浘鐨勫伐鍏鋒寜閽潵緇撳悎澶氭瑕嗙洊嫻嬭瘯鐨勭粨鏋溿?/p>

鍥?6 鐢ㄤ簬緇撳悎澶氭瑕嗙洊嫻嬭瘯緇撴灉鐨勫伐鍏鋒爮鎸夐挳
鍥?6 鐢ㄤ簬緇撳悎澶氭瑕嗙洊嫻嬭瘯緇撴灉鐨勫伐鍏鋒爮鎸夐挳

褰撴垜浠嬈¤繍琛?Coverage 涔嬪悗錛屾垜浠彲浠ュ崟鍑?鍥?6 鎵紺哄伐鍏鋒爮鎸夐挳銆備箣鍚庯紝涓涓璇濇灝嗚寮瑰嚭浠ヤ緵鐢ㄦ埛閫夋嫨闇瑕佸悎騫剁殑瑕嗙洊嫻嬭瘯銆?/p>

鍥?7 閫夋嫨闇瑕佸悎騫剁殑瑕嗙洊嫻嬭瘯緇撴灉
鍥?7 閫夋嫨闇瑕佸悎騫剁殑瑕嗙洊嫻嬭瘯緇撴灉

鍦ㄥ悎騫跺畬鎴愪箣鍚庯紝鎴戜滑鍙互瑙傚療鍒?Java 緙栬緫鍣ㄥ拰 Coverage 瑙嗗浘涓兘鏄劇ず浜嗗悎騫朵箣鍚庣殑緇撴灉錛?/p>

鍥?8 瀵熺湅鍚堝茍鍚庣殑瑕嗙洊嫻嬭瘯緇撴灉
鍥?8 瀵熺湅鍚堝茍鍚庣殑瑕嗙洊嫻嬭瘯緇撴灉

鍥?8 涓紝鎴戜滑鍙互鐪嬪埌錛岄氳繃澶氭榪愯瑕嗙洊嫻嬭瘯錛屾渶緇堟垜浠殑浠g爜杈懼埌浜?91.4% 鐨勬祴璇曡鐩栫巼銆傛湁瓚g殑鏄紝鍥句腑絎笁琛屼唬鐮佽鏍囪涓虹孩鑹詫紝鑰屾琛屼唬鐮佸疄闄呬笂鏄笉鍙墽琛岀殑銆傚ゥ濡欏湪浜庯紝鎴戜滑娌℃湁鐢熸垚浠諱綍 HelloWorld 綾葷殑瀹炰緥錛屽洜姝ょ己鐪佹瀯閫犲嚱鏁版病鏈夎璋冪敤錛岃?EclEmma 灝嗚繖涓壒孌婁唬鐮佺殑瑕嗙洊鐘舵佹爣璁板湪綾誨0鏄庣殑絎竴琛屻?/p>


EclEmma 鐨勯珮綰х壒鎬?/h2>

濡傛灉 EclEmma 鍙兘嫻嬭瘯 Java Application 鐨勬祴璇曡鐩栫巼錛岄偅涔堝畠鐩稿鍛戒護琛岀増鏈殑 Emma 鏉ヨ錛屾彁渚涚殑澧炲己灝變笉澶氫簡銆傜浉鍙嶏紝EclEmma 鎻愪緵浜嗗緢澶氫笌 Eclipse 绱у瘑緇撳悎鐨勫姛鑳姐傚畠涓嶄粎鑳芥祴璇?Java Application錛岃繕鑳借綆?JUnit 鍗曞厓嫻嬭瘯錛屽 Eclipse 鎻掍歡嫻嬭瘯鐨勮鐩栫巼銆備粠 鍥?9 涓垜浠彲浠ョ湅鍒?EclEmma 鐩墠鏀寔鍥涚綾誨瀷鐨勭▼搴忋?/p>

鍥?9 EclEmma 鐨勯厤緗〉闈?/h5>鍥?9 EclEmma 鐨勯厤緗〉闈? src=

涓轟簡浜嗚В EclEmma 鏄浣曡幏寰楄鐩栨祴璇曟暟鎹殑錛屾垜浠渶瑕佸厛瀵?Emma 鏈夊垵姝ョ殑浜嗚В銆傞氬父浠g爜瑕嗙洊嫻嬭瘯宸ュ叿閮介渶瑕佸琚墽琛岀殑浠g爜榪涜淇敼銆傝?Emma 鎻愪緵浜嗕袱縐嶆柟寮忔潵瀹屾垚榪欎歡浜嬨?/p>

  1. 棰勬彃鍏ユā寮忥細瀵圭▼搴忚繘琛屾祴閲忎箣鍓嶏紝闇瑕侀噰鐢?Emma 鎻愪緵鐨勫伐鍏峰 class 鏂囦歡鎴栬?jar 鏂囦歡榪涜淇敼銆備慨鏀瑰畬鎴愪箣鍚庣殑浠g爜鍙互绔嬪埢琚墽琛屻傝鐩栨祴璇曠殑緇撴灉灝嗕細琚瓨鏀懼埌鎸囧畾鐨勬枃浠朵腑銆?/li>
  2. 鍗蟲椂鎻掑叆妯″紡錛?/strong>鍗蟲椂鎻掑叆妯″紡涓嶉渶瑕佷簨鍏堝浠g爜榪涜淇敼銆傜浉鍙嶏紝瀵逛唬鐮佺殑淇敼鏄氳繃涓涓?Emma 瀹氬埗鐨?Class loader錛堢被杞藉叆鍣級榪涜鐨勩傝繖縐嶆柟寮忕殑浼樼偣寰堟槑鏄撅紝鎴戜滑涓嶉渶瑕佸 class 鎴栬?jar 鏂囦歡榪涜浠諱綍淇敼銆傜己鐐規槸鎴戜滑涓轟簡鑾峰緱嫻嬭瘯鐨勭粨鏋滐紝闇瑕佺敤 Emma 鎻愪緵鐨勫懡浠?emmarun 鏉ユ墽琛?Java 搴旂敤紼嬪簭銆?/li>

浣跨敤鍗蟲椂鎻掑叆妯″紡鐨勪紭鐐瑰緢鏄庢樉錛歝lass 鏂囦歡鍜?jar 鏂囦歡涓嶄細琚慨鏀廣傝岄鎻掑叆妯″紡鐨勫簲鐢ㄨ寖鍥存洿涓哄箍娉涳紝瀵逛簬鏌愪簺闇瑕佸祵鍏ュ埌妗嗘灦涓繍琛岀殑浠g爜鏉ヨ錛堜緥濡?EJB錛夛紝鎴戜滑鍙兘浣跨敤棰勬彃鍏ユā寮忋侲clEmma 浠呬粎浣跨敤浜?Emma 鐨勯鎻掑叆妯″紡鏉ュ伐浣滐紝涓嶈繃 EclEmma 緙虹渷浼氬湪涓存椂鐩綍涓垱寤?class 鏂囦歡鍜?jar 鏂囦歡鐨勫壇鏈潵榪涜淇敼錛屽洜姝ゅ湪 workspace 涓?class 鍜?jar 鏂囦歡浠嶇劧淇濇寔鍘熸牱銆傝櫧鐒跺惉涓婂幓寰堝ソ錛屼絾鏄敱浜庨渶瑕佷慨鏀?classpath 鏉ヤ嬌鐢ㄤ慨鏀硅繃鐨?class 鍜?jar 鏂囦歡錛屽浜庝笉鑳戒慨鏀?classpath 鐨勫簲鐢紙渚嬪 Eclipse RCP 鍜?JUnit Plugin Test錛夋潵璇達紝鎴戜滑榪樻槸鍙兘閫夋嫨淇敼 workspace 涓殑 class 鏂囦歡鍜?jar 鏂囦歡銆傚浜?Java Application 鍜?JUnit 綾誨瀷鐨勮鐩栨祴璇曪紝鎴戜滑鍙互鍦ㄩ厤緗璇濇涓変腑“In-place instrumentation”欏規潵鎸囧畾鐩存帴淇敼 Workspace 涓殑 .class 鏂囦歡鍜?.jar 鏂囦歡銆?/p>



Rabbit 2013-11-01 09:43 鍙戣〃璇勮
]]>
鍩轟簬Xfire SOAP Header鐨刉ebService瀹夊叏楠岃瘉鏁欑▼ .http://www.tkk7.com/rabbit/archive/2013/10/24/405610.htmlRabbitRabbitThu, 24 Oct 2013 08:28:00 GMThttp://www.tkk7.com/rabbit/archive/2013/10/24/405610.htmlhttp://www.tkk7.com/rabbit/comments/405610.htmlhttp://www.tkk7.com/rabbit/archive/2013/10/24/405610.html#Feedback1http://www.tkk7.com/rabbit/comments/commentRss/405610.htmlhttp://www.tkk7.com/rabbit/services/trackbacks/405610.htmlWebSerice鏄竴縐嶅紑鏀劇殑web鏈嶅姟錛屼換浣曚漢閮藉彲浠ヨ闂紝浣嗘垜浠湁鏃跺欓渶瑕佽冭檻鍙湁浠樿垂鐢ㄦ埛鎵嶈兘浣跨敤WS,鎵浠ワ紝鎴戜滑灝遍渶瑕佸WS鍔犲叆瀹夊叏楠岃瘉鏈哄埗錛屽綋鐒訛紝鍙互鍒╃敤闃茬伀澧欑殑IP榪囨護錛寃eb搴旂敤鐨勯厤緗粠鏈澶栧眰鍘婚殧紱婚潪娉曠敤鎴鳳紝浣嗗湪鍐呭眰錛屾垜浠篃鍙互浣跨敤SOAP Header鐨勬柟寮忥紝鐢卞鎴風鍙戦侀獙璇佹暟鎹紝鏈嶅姟绔獙閫氳繃鍚庡熀WS璁塊棶鏉冮檺

棣栧厛鏍規嵁鎴戠殑榪欑瘒Blog

http://blog.csdn.net/daryl715/archive/2007/07/25/1707161.aspx

閰嶇疆WS Server鍜學S Client錛?font color="#ff0000">鍏朵腑Client绔殑嫻嬭瘯浠g爜綾誨悕鐢盋lient鏀逛負ClientTest,鍥犱負鎴戜滑瑕佺敤鍒癤fire鐨勪竴涓悕涓篊lient鐨勭被 

 

棣栧厛鎴戜滑緙栧啓鏈嶅姟绔獙璇佺被緇ф壙AbstractHandler

 

package test;

import org.codehaus.xfire.MessageContext;
import org.codehaus.xfire.handler.AbstractHandler;
import org.jdom.Element;

public class AuthenticationHandler extends AbstractHandler {

    
public void invoke(MessageContext cfx) throws Exception {
           
if(cfx.getInMessage().getHeader() == null)
           
{
               
throw new org.codehaus.xfire.fault.XFireFault("璇鋒眰蹇呴』鍖呭惈楠岃瘉淇℃伅",org.codehaus.xfire.fault.XFireFault.SENDER);
           }

           Element token
=cfx.getInMessage().getHeader().getChild("AuthenticationToken");
           
if (token == null
           

            
throw new org.codehaus.xfire.fault.XFireFault("璇鋒眰蹇呴』鍖呭惈韜喚楠岃瘉淇℃伅", org.codehaus.xfire.fault.XFireFault.SENDER); 
           }
 

              String username 
= token.getChild("Username").getValue(); 
              String password 
= token.getChild("Password").getValue(); 
              
try 
              

                  
//榪涜韜喚楠岃瘉 錛屽彧鏈塧bcd@1234鐨勭敤鎴蜂負鎺堟潈鐢ㄦ埛
                 if(username.equals("abcd"&& password.equals("1234"))
                  
//榪欒鍙ヤ笉鏄劇ず
                  System.out.println("韜喚楠岃瘉閫氳繃");
                 
else throw new Exception();
              }
 
              
catch (Exception e) 
              

                  
throw new   org.codehaus.xfire.fault.XFireFault("闈炴硶鐨勭敤鎴峰悕鍜屽瘑鐮?/span>",   org.codehaus.xfire.fault.XFireFault.SENDER); 
              }
 

          }
 



}

 

涓嬮潰鏄疌lient鍙戦佹巿鏉冧俊鎭?/p>

 

package test;

import org.codehaus.xfire.MessageContext;
import org.codehaus.xfire.handler.AbstractHandler;
import org.jdom.Element;

public class ClientAuthenticationHandler extends AbstractHandler {

     
private String username = null

     
private String password = null

     
public ClientAuthenticationHandler() 

     }
 

     
public ClientAuthenticationHandler(String username,String password) 

         
this.username = username; 

         
this.password = password; 
     }
 

     
public void setUsername(String username) 

         
this.username = username; 

     }
 

     
public void setPassword(String password) 

         
this.password = password; 

     }
 

     
public void invoke(MessageContext context) throws Exception 

         
//涓篠OAP Header鏋勯犻獙璇佷俊鎭?/span>
         Element el = new Element("header"); 
         context.getOutMessage().setHeader(el); 
         Element auth 
= new Element("AuthenticationToken"); 
         Element username_el 
= new Element("Username"); 
         username_el.addContent(username); 
         Element password_el 
= new Element("Password"); 
         password_el.addContent(password); 
         auth.addContent(username_el); 
         auth.addContent(password_el); 
         el.addContent(auth); 
     }
 



}

涓篊lientTest.java鍔犲叆浠ヤ笅浠g爜

 XFireProxy proxy = (XFireProxy)Proxy.getInvocationHandler(service);
Client client = proxy.getClient();
client.addOutHandler(new ClientAuthenticationHandler("abcd1","1234"));

絳夌瓑錛岃繕娌℃湁瀹岋紝淇敼Services.xm涓篧S緇戝畾Handler

  

<?xml version="1.0" encoding="UTF-8"?>


<beans>
<service xmlns="http://xfire.codehaus.org/config/1.0">
<name>HelloService</name>
<namespace>http://test/HelloService</namespace>
<serviceClass>test.IHelloService</serviceClass>
<implementationClass>test.HelloServiceImpl</implementationClass>
 
<inHandlers> 
 
<handler  handlerClass ="test.AuthenticationHandler" ></handler > 
 
</inHandlers>
</service>
</beans>


榪欐牱鎴戜滑灝卞畬鎴愪簡緙栫爜錛屼笅闈㈠惎鍔╰omcat錛岃繍琛屽鎴風浠g爜錛屾湰鏂囦負abcd@1234浣嶆巿鏉冪敤鎴鳳紝浣跨敤abcd@1234,鍙互姝e父璁塊棶WS,濡傛灉鐢ㄩ敊璇笎鍙鳳紝鍒欎細鏈変互涓嬪紓甯?/font>

 

Exception in thread "main" org.codehaus.xfire.XFireRuntimeException: Could not invoke service.. Nested exception is org.codehaus.xfire.fault.XFireFault: 闈炴硶鐨勭敤鎴峰悕鍜屽瘑鐮?br />org.codehaus.xfire.fault.XFireFault: 闈炴硶鐨勭敤鎴峰悕鍜屽瘑鐮?br />    at org.codehaus.xfire.fault.Soap11FaultSerializer.readMessage(Soap11FaultSerializer.java:31)
    at org.codehaus.xfire.fault.SoapFaultSerializer.readMessage(SoapFaultSerializer.java:28)
    at org.codehaus.xfire.soap.handler.ReadHeadersHandler.checkForFault(ReadHeadersHandler.java:111)
    at org.codehaus.xfire.soap.handler.ReadHeadersHandler.invoke(ReadHeadersHandler.java:67)
    at org.codehaus.xfire.handler.HandlerPipeline.invoke(HandlerPipeline.java:131)
    at org.codehaus.xfire.client.Client.onReceive(Client.java:406)
    at org.codehaus.xfire.transport.http.HttpChannel.sendViaClient(HttpChannel.java:139)
    at org.codehaus.xfire.transport.http.HttpChannel.send(HttpChannel.java:48)
    at org.codehaus.xfire.handler.OutMessageSender.invoke(OutMessageSender.java:26)
    at org.codehaus.xfire.handler.HandlerPipeline.invoke(HandlerPipeline.java:131)
    at org.codehaus.xfire.client.Invocation.invoke(Invocation.java:79)
    at org.codehaus.xfire.client.Invocation.invoke(Invocation.java:114)
    at org.codehaus.xfire.client.Client.invoke(Client.java:336)
    at org.codehaus.xfire.client.XFireProxy.handleRequest(XFireProxy.java:77)
    at org.codehaus.xfire.client.XFireProxy.invoke(XFireProxy.java:57)
    at $Proxy0.getUser(Unknown Source)
    at test.ClientTest.main(ClientTest.java:39)

 

濡傛灉涓嶅湪CientTest鍔犱互涓嬪鍔燞eade鍒欎細鏈変互涓嬪紓甯?/p>

 XFireProxy proxy = (XFireProxy)Proxy.getInvocationHandler(service);
Client client = proxy.getClient();
 client.addOutHandler(new ClientAuthenticationHandler("abcd1","1234"));

Exception in thread "main" org.codehaus.xfire.XFireRuntimeException: Could not invoke service.. Nested exception is org.codehaus.xfire.fault.XFireFault: 璇鋒眰蹇呴』鍖呭惈楠岃瘉淇℃伅
org.codehaus.xfire.fault.XFireFault: 璇鋒眰蹇呴』鍖呭惈楠岃瘉淇℃伅
    at org.codehaus.xfire.fault.Soap11FaultSerializer.readMessage(Soap11FaultSerializer.java:31)
    at org.codehaus.xfire.fault.SoapFaultSerializer.readMessage(SoapFaultSerializer.java:28)
    at org.codehaus.xfire.soap.handler.ReadHeadersHandler.checkForFault(ReadHeadersHandler.java:111)
    at org.codehaus.xfire.soap.handler.ReadHeadersHandler.invoke(ReadHeadersHandler.java:67)
    at org.codehaus.xfire.handler.HandlerPipeline.invoke(HandlerPipeline.java:131)
    at org.codehaus.xfire.client.Client.onReceive(Client.java:406)
    at org.codehaus.xfire.transport.http.HttpChannel.sendViaClient(HttpChannel.java:139)
    at org.codehaus.xfire.transport.http.HttpChannel.send(HttpChannel.java:48)
    at org.codehaus.xfire.handler.OutMessageSender.invoke(OutMessageSender.java:26)
    at org.codehaus.xfire.handler.HandlerPipeline.invoke(HandlerPipeline.java:131)
    at org.codehaus.xfire.client.Invocation.invoke(Invocation.java:79)
    at org.codehaus.xfire.client.Invocation.invoke(Invocation.java:114)
    at org.codehaus.xfire.client.Client.invoke(Client.java:336)
    at org.codehaus.xfire.client.XFireProxy.handleRequest(XFireProxy.java:77)
    at org.codehaus.xfire.client.XFireProxy.invoke(XFireProxy.java:57)
    at $Proxy0.getUser(Unknown Source)
    at test.ClientTest.main(ClientTest.java:35)


Rabbit 2013-10-24 16:28 鍙戣〃璇勮
]]>java瀹炵幇綆鍗曠殑鍗曠偣鐧誨綍(杞澆)http://www.tkk7.com/rabbit/archive/2013/10/18/405392.htmlRabbitRabbitFri, 18 Oct 2013 01:44:00 GMThttp://www.tkk7.com/rabbit/archive/2013/10/18/405392.htmlhttp://www.tkk7.com/rabbit/comments/405392.htmlhttp://www.tkk7.com/rabbit/archive/2013/10/18/405392.html#Feedback0http://www.tkk7.com/rabbit/comments/commentRss/405392.htmlhttp://www.tkk7.com/rabbit/services/trackbacks/405392.html闃呰鍏ㄦ枃

Rabbit 2013-10-18 09:44 鍙戣〃璇勮
]]>
瑙e喅IE涓婭frame鐨凷ession涓㈠けhttp://www.tkk7.com/rabbit/archive/2013/06/09/400441.htmlRabbitRabbitSun, 09 Jun 2013 07:57:00 GMThttp://www.tkk7.com/rabbit/archive/2013/06/09/400441.htmlhttp://www.tkk7.com/rabbit/comments/400441.htmlhttp://www.tkk7.com/rabbit/archive/2013/06/09/400441.html#Feedback1http://www.tkk7.com/rabbit/comments/commentRss/400441.htmlhttp://www.tkk7.com/rabbit/services/trackbacks/400441.html涓葷晫闈嬌鐢ㄧ殑鏄疘frame鍋氱殑 鍔ㄦ佸唴瀹瑰祵濂?闇瑕佺櫥褰?浣嗘槸姣忔鍒鋒柊 session 閮藉け鏁?...

鏁翠釜搴旂敤鍦‵F涓嬫槸姝e父鐨勶紝浣嗘槸鍦↖E涓嬫瘡嬈$偣鍑諱笅涓欏電殑鏃跺欓兘瑕侀噸鏂扮櫥褰曘傜粡榪囪皟璇曞彂鐜板埛鏂板悗璇鋒眰閲囩敤浜嗘柊鐨?sessionId錛屼簬鏄鐤戝埌浜嗘槸Iframe鐨勯棶棰樸傚湪緗戜笂鎼滀簡涓涓嬶紝鏋滅湡鏄疘E鐨処frame闂銆侷E6/IE7鏀寔鐨凱3P(Platform for Privacy Preferences Project (P3P) specification)鍗忚榛樿闃繪絎笁鏂規棤闅愮瀹夊叏澹版槑鐨刢ookie錛孎irefox鐩墠榪樹笉鏀寔P3P瀹夊叏鐗?鎬э紝firefox涓笉瀛樺湪姝ら棶棰樸?br />鍏蜂綋鐨勮В鍐蟲柟寮忔槸鍦ㄧ櫥褰曠殑Action澶勭悊鏂規硶涓?/span>鍔犱笂 
response.setHeader("P3P","CP=CAO PSA OUR IDC DSP COR ADM DEVi TAIi PSD IVAi IVDi CONi HIS IND CNT"); 
闂鎼炲畾錛?/p>

Rabbit 2013-06-09 15:57 鍙戣〃璇勮
]]>
struts 2鏍囩 <s:textfield> 鏍峰紡闂http://www.tkk7.com/rabbit/archive/2013/06/05/400213.htmlRabbitRabbitWed, 05 Jun 2013 02:29:00 GMThttp://www.tkk7.com/rabbit/archive/2013/06/05/400213.htmlhttp://www.tkk7.com/rabbit/comments/400213.htmlhttp://www.tkk7.com/rabbit/archive/2013/06/05/400213.html#Feedback0http://www.tkk7.com/rabbit/comments/commentRss/400213.htmlhttp://www.tkk7.com/rabbit/services/trackbacks/400213.html鍒濆struts2錛屽湪澶磋剳涓竴鐩村湪鎯充竴涓棶棰橈紝灝辨槸瀵逛簬struts2 錛屽綋搴旂敤鍏惰嚜韜殑鏍囩鏃訛紝渚嬪錛?/p>

<s:form>

   <s:textfield name="a"></s:textfield>

</s:form>

褰撴煡鐪嬫簮浠g爜鏃朵負錛?/p>

<form>

<table>

    <tr><td><input type="text" name=a/></td></tr>

</table>

</form>

鑷姩娣誨姞鐨則able tr td 鏍囩錛屼絾濡傛灉鎯?涓琛屾樉紺哄鍒楁庝箞鍔烇紵

緗戜笂鏌ヤ簡鏌ワ紝鏈夊ソ澶氬鎬殑瑙e喅鍔炴硶錛屾瘮濡傝閫氳繃鍦ㄩ〉闈笂鍒ゆ柇錛岀湅浠涔堟椂鍊欒緭鍏?lt;tr> 鏍囩錛屼絾鎴戣涓猴紝struts2榪欐牱鍋氾紝閭d篃澶笉浜洪亾浜嗭紝鍚庣粓浜庢煡鍒板師鍥狅紝鐜版葷粨濡備笅錛?/p>

鍘熺悊錛氬湪struts2涓姞鍏ヤ簡theme(涓婚錛夌殑姒傚康錛岄氳繃璁劇疆涓嶅悓鐨勪富棰橈紝鍙互璁﹕truts鐨勪唬鐮佽緭鍑轟笉鍚岀殑html浠g爜錛屼綘涔熷氨鐩稿簲寰楀埌涓嶅悓鐨勫竷灞鏁堟灉銆?/p>

闂涓錛歋truts2鏈夊摢浜涗富棰橈紵

Struts2鎻愪緵浜嗕笁縐嶄富棰橈紝ajax, simple, xhtml錛屽畠榛樿鐨勬槸xhtml涓婚錛屽綋鐒朵綘鍙互鍐欎換鎰忎釜浣犺嚜宸辯殑涓婚,鎴戜滑縐頒箣涓鴻嚜瀹氫箟涓婚

闂浜岋細Struts2鎬庝箞鏀癸紵

鏈変袱縐嶆柟娉曞彲浠ヨВ鍐?

1.綆鍗曠殑鏂規硶錛堜篃寰堝疄鐢級

鍦⊿truts.xml涓紝鍔犱笂涓嬩竴琛屼唬鐮佸氨鍙互浜?/p>

<constant name="struts.ui.theme" value="simple" />

浠h〃鎵鏈夌殑欏甸潰閲囩敤鐨勯兘鏄?simple涓婚浜嗭紝榪欐椂瀹冭緭鍑虹殑欏甸潰錛屼笉鍥炴坊鍔犱換浣曞浣欑殑浠g爜錛屾瘮濡?table tr td 絳夛紝鎴戜滑灝卞彲浠ュ儚鍏朵粬緙栬緫欏甸潰鐨勬柟寮忕紪杈戦〉闈㈢殑椋庢牸銆?/p>

鎴栬?鍦?<s:form 涓坊鍔?theme

<s:form theme="simple"></s:form>

struts2姣忎釜鏍囩閮芥湁theme灞炴?/p>

2.鍦⊿truts.properties閲屾敼錛?/p>

#璁劇疆涓婚
struts.ui.theme=simple

鍙鍙︿竴綃囷細struts.properties



Rabbit 2013-06-05 10:29 鍙戣〃璇勮
]]>
ORACLE涓璍ike涓嶪nstr妯$硦鏌ヨ鎬ц兘澶ф瘮鎷?/title><link>http://www.tkk7.com/rabbit/archive/2013/01/21/394510.html</link><dc:creator>Rabbit</dc:creator><author>Rabbit</author><pubDate>Mon, 21 Jan 2013 07:51:00 GMT</pubDate><guid>http://www.tkk7.com/rabbit/archive/2013/01/21/394510.html</guid><wfw:comment>http://www.tkk7.com/rabbit/comments/394510.html</wfw:comment><comments>http://www.tkk7.com/rabbit/archive/2013/01/21/394510.html#Feedback</comments><slash:comments>3</slash:comments><wfw:commentRss>http://www.tkk7.com/rabbit/comments/commentRss/394510.html</wfw:commentRss><trackback:ping>http://www.tkk7.com/rabbit/services/trackbacks/394510.html</trackback:ping><description><![CDATA[<p align="left" style="line-height: 25px; margin: 0px 0px 10px; padding: 0px; color: #4c402b; font-family: Arial, Helvetica, simsun, u5b8bu4f53; background-color: #fbf8f4;"><strong><span verdana","sans-serif";""="" 瀹嬩綋;color:black;"="">ORACLE</span></strong><strong><span style="font-family: 瀹嬩綋; color: black;">涓?/span></strong><strong><span verdana","sans-serif";""="" 瀹嬩綋;color:black;"="">Like</span></strong><strong><span style="font-family: 瀹嬩綋; color: black;">涓?/span></strong><strong><span verdana","sans-serif";="" color:black;""="" 0pt;"="">Instr</span></strong><strong><span style="font-family: 瀹嬩綋; color: black;">妯$硦鏌ヨ鎬ц兘澶ф瘮鎷?/span></strong><strong></strong></p><p align="left" style="line-height: 25px; margin: 0px 0px 10px; padding: 0px; color: #4c402b; font-family: Arial, Helvetica, simsun, u5b8bu4f53; background-color: #fbf8f4;"> </p><p align="left" style="line-height: 25px; margin: 0px 0px 10px; padding: 0px; color: #4c402b; font-family: Arial, Helvetica, simsun, u5b8bu4f53; background-color: #fbf8f4;"> </p><p style="line-height: 25px; margin: 0px 0px 10px; padding: 0px; color: #4c402b; font-family: Arial, Helvetica, simsun, u5b8bu4f53; background-color: #fbf8f4;"><span verdana","sans-serif";="" color:red;""="" 0pt;"="" style="line-height: 28px; font-size: 12pt;">instr(title,'</span><span style="line-height: 28px; font-size: 12pt; font-family: 瀹嬩綋; color: red;">鎵嬪唽</span><span verdana","sans-serif";="" color:red;"="" style="line-height: 28px; font-size: 12pt;">')>0  </span><span style="line-height: 28px; font-size: 12pt; font-family: 瀹嬩綋; color: red;">鐩稿綋浜?/span><span verdana","sans-serif";="" color:red;""="" 0pt;"="" style="line-height: 28px; font-size: 12pt;">  title like '%</span><span style="line-height: 28px; font-size: 12pt; font-family: 瀹嬩綋; color: red;">鎵嬪唽</span><span verdana","sans-serif";="" color:red;""="" 0pt;"="" style="line-height: 28px; font-size: 12pt;">%'</span></p><p style="line-height: 25px; margin: 0px 0px 10px; padding: 0px; color: #4c402b; font-family: Arial, Helvetica, simsun, u5b8bu4f53; background-color: #fbf8f4;"> </p><p style="line-height: 25px; margin: 0px 0px 10px; padding: 0px; color: #4c402b; font-family: Arial, Helvetica, simsun, u5b8bu4f53; background-color: #fbf8f4;"><span verdana","sans-serif";="" color:red;""="" 0pt;"="" style="line-height: 28px; font-size: 12pt;">instr(title,'</span><span style="line-height: 28px; font-size: 12pt; font-family: 瀹嬩綋; color: red;">鎵嬪唽</span><span verdana","sans-serif";="" color:red;"="" style="line-height: 28px; font-size: 12pt;">')=1  </span><span style="line-height: 28px; font-size: 12pt; font-family: 瀹嬩綋; color: red;">鐩稿綋浜?/span><span verdana","sans-serif";="" color:red;""="" 0pt;"="" style="line-height: 28px; font-size: 12pt;">  title like '</span><span style="line-height: 28px; font-size: 12pt; font-family: 瀹嬩綋; color: red;">鎵嬪唽</span><span verdana","sans-serif";="" color:red;""="" 0pt;"="" style="line-height: 28px; font-size: 12pt;">%'</span></p><p style="line-height: 25px; margin: 0px 0px 10px; padding: 0px; color: #4c402b; font-family: Arial, Helvetica, simsun, u5b8bu4f53; background-color: #fbf8f4;"> </p><p style="line-height: 25px; margin: 0px 0px 10px; padding: 0px; color: #4c402b; font-family: Arial, Helvetica, simsun, u5b8bu4f53; background-color: #fbf8f4;"><span verdana","sans-serif";="" color:red;""="" 0pt;"="" style="line-height: 28px; font-size: 12pt;">instr(title,'</span><span style="line-height: 28px; font-size: 12pt; font-family: 瀹嬩綋; color: red;">鎵嬪唽</span><span verdana","sans-serif";="" color:red;"="" style="line-height: 28px; font-size: 12pt;">')=0  </span><span style="line-height: 28px; font-size: 12pt; font-family: 瀹嬩綋; color: red;">鐩稿綋浜?/span><span verdana","sans-serif";="" color:red;""="" 0pt;"="" style="line-height: 28px; font-size: 12pt;">  title not like '%</span><span style="line-height: 28px; font-size: 12pt; font-family: 瀹嬩綋; color: red;">鎵嬪唽</span><span verdana","sans-serif";="" color:red;""="" 0pt;"="" style="line-height: 28px; font-size: 12pt;">%'</span></p><p style="line-height: 25px; margin: 0px 0px 10px; padding: 0px; color: #4c402b; font-family: Arial, Helvetica, simsun, u5b8bu4f53; background-color: #fbf8f4;"> </p><p align="left" style="line-height: 25px; margin: 7.5pt 0cm; padding: 0px; color: #4c402b; font-family: Arial, Helvetica, simsun, u5b8bu4f53; background-color: #fbf8f4;"><span verdana","sans-serif";="" color:black;""="" 0pt;"="">t</span><span style="font-family: 瀹嬩綋; color: black;">琛ㄤ腑灝嗚繎鏈?/span><span verdana","sans-serif";="" color:black;"="">1100</span><span style="font-family: 瀹嬩綋; color: black;">涓囨暟鎹紝寰堝鏃跺欙紝鎴戜滑瑕佽繘琛屽瓧絎︿覆鍖歸厤錛屽湪</span><span verdana","sans-serif";="" color:black;"="">SQL</span><span style="font-family: 瀹嬩綋; color: black;">璇彞涓紝鎴戜滑閫氬父浣跨敤</span><span verdana","sans-serif";""="" 瀹嬩綋;color:black;"="">like</span><span style="font-family: 瀹嬩綋; color: black;">鏉ヨ揪鍒版垜浠悳绱㈢殑鐩爣銆備絾緇忚繃瀹為檯嫻嬭瘯鍙戠幇錛?/span><span verdana","sans-serif";="" color:black;""="" 0pt;"="">like</span><span style="font-family: 瀹嬩綋; color: black;">鐨勬晥鐜囦笌</span><span verdana","sans-serif";""="" 瀹嬩綋;color:black;"="">instr</span><span style="font-family: 瀹嬩綋; color: black;">鍑芥暟宸埆鐩稿綋澶с備笅闈㈡槸涓浜涙祴璇曠粨鏋滐細</span></p><p align="left" style="line-height: 25px; margin: 7.5pt 0cm; padding: 0px; color: #4c402b; font-family: Arial, Helvetica, simsun, u5b8bu4f53; background-color: #fbf8f4;"><span verdana","sans-serif";="" color:black;""="" 0pt;"="">SQL> set timing on<br />SQL> select count(*) from t where instr(title,'</span><span style="font-family: 瀹嬩綋; color: black;">鎵嬪唽</span><span verdana","sans-serif";="" color:black;"="">')>0;</span></p><p align="left" style="line-height: 25px; margin: 7.5pt 0cm; padding: 0px; color: #4c402b; font-family: Arial, Helvetica, simsun, u5b8bu4f53; background-color: #fbf8f4;"><span verdana","sans-serif";="" color:black;""="" 0pt;"="">  COUNT(*)<br />----------<br />     65881</span></p><p align="left" style="line-height: 25px; margin: 7.5pt 0cm; padding: 0px; color: #4c402b; font-family: Arial, Helvetica, simsun, u5b8bu4f53; background-color: #fbf8f4;"><span verdana","sans-serif";="" color:black;""="" 0pt;"="">Elapsed: 00:00:11.04<br />SQL> select count(*) from t where title like '%</span><span style="font-family: 瀹嬩綋; color: black;">鎵嬪唽</span><span verdana","sans-serif";="" color:black;"="">%';</span></p><p align="left" style="line-height: 25px; margin: 7.5pt 0cm; padding: 0px; color: #4c402b; font-family: Arial, Helvetica, simsun, u5b8bu4f53; background-color: #fbf8f4;"><span verdana","sans-serif";="" color:black;""="" 0pt;"="">  COUNT(*)<br />----------<br />     65881</span></p><p align="left" style="line-height: 25px; margin: 7.5pt 0cm; padding: 0px; color: #4c402b; font-family: Arial, Helvetica, simsun, u5b8bu4f53; background-color: #fbf8f4;"><span verdana","sans-serif";="" color:black;""="" 0pt;"="">Elapsed: 00:00:31.47<br />SQL> select count(*) from t where instr(title,'</span><span style="font-family: 瀹嬩綋; color: black;">鎵嬪唽</span><span verdana","sans-serif";="" color:black;"="">')=0;</span></p><p align="left" style="line-height: 25px; margin: 7.5pt 0cm; padding: 0px; color: #4c402b; font-family: Arial, Helvetica, simsun, u5b8bu4f53; background-color: #fbf8f4;"><span verdana","sans-serif";="" color:black;""="" 0pt;"="">  COUNT(*)<br />----------<br />  11554580</span></p><p align="left" style="line-height: 25px; margin: 7.5pt 0cm; padding: 0px; color: #4c402b; font-family: Arial, Helvetica, simsun, u5b8bu4f53; background-color: #fbf8f4;"><span verdana","sans-serif";="" color:black;""="" 0pt;"="">Elapsed: 00:00:11.31<br />SQL> select count(*) from t where title not like '%</span><span style="font-family: 瀹嬩綋; color: black;">鎵嬪唽</span><span verdana","sans-serif";="" color:black;"="">%';</span></p><p align="left" style="line-height: 25px; margin: 7.5pt 0cm; padding: 0px; color: #4c402b; font-family: Arial, Helvetica, simsun, u5b8bu4f53; background-color: #fbf8f4;"><span verdana","sans-serif";="" color:black;""="" 0pt;"="">  COUNT(*)<br />----------<br />  11554580</span></p><p align="left" style="line-height: 25px; margin: 0px 0px 10px; padding: 0px; color: #4c402b; font-family: Arial, Helvetica, simsun, u5b8bu4f53; background-color: #fbf8f4;"><span style="font-family: 瀹嬩綋; color: black;">鍙﹀錛屾垜鍦ㄧ粨鍙﹀涓涓?/span><span verdana","sans-serif";""="" 瀹嬩綋;color:black;"="">2</span><span style="font-family: 瀹嬩綋; color: black;">浜垮鐨勮〃錛屼嬌鐢?/span><span verdana","sans-serif";="" color:black;""="" 0pt;"="">8</span><span style="font-family: 瀹嬩綋; color: black;">涓茍琛岋紝浣跨敤</span><span verdana","sans-serif";="" color:black;"="">like</span><span style="font-family: 瀹嬩綋; color: black;">鏌ヨ寰堜箙閮戒笉鍑烘潵緇撴灉錛屼絾浣跨敤</span><span verdana","sans-serif";""="" 瀹嬩綋;color:black;"="">instr,4</span><span style="font-family: 瀹嬩綋; color: black;">鍒嗛挓鍗沖畬鎴愭煡鎵撅紝鎬ц兘鏄浉褰撶殑濂姐傝繖浜涘皬鎶宸х敤濂斤紝宸ヤ綔鏁堢巼鎻愰珮涓嶅皯銆傞氳繃涓婇潰鐨勬祴璇曡鏄庯紝</span><span verdana","sans-serif";="" color:black;""="" 0pt;"="">ORACLE</span><span style="font-family: 瀹嬩綋; color: black;">鍐呭緩鐨勪竴浜涘嚱鏁幫紝鏄粡榪囩浉褰撶▼搴︾殑浼樺寲鐨勩?/span></p><p style="line-height: 25px; margin: 0px 0px 10px; padding: 0px; color: #4c402b; font-family: Arial, Helvetica, simsun, u5b8bu4f53; background-color: #fbf8f4;"> </p><p style="line-height: 25px; margin: 0px 0px 10px; padding: 0px; color: #4c402b; font-family: Arial, Helvetica, simsun, u5b8bu4f53; background-color: #fbf8f4;"><span style="color: red;">instr(title,’aaa’)>0 </span><span style="color: red;">鐩稿綋浜巐ike</span></p><p style="line-height: 25px; margin: 11.25pt 0cm; padding: 0px; color: #4c402b; font-family: Arial, Helvetica, simsun, u5b8bu4f53; background-color: #fbf8f4;"><span style="font-size: 10.5pt; color: red;">instr(title,’aaa’)=0 </span><span style="font-size: 10.5pt; color: red;">鐩稿綋浜巒ot like</span></p><p style="line-height: 25px; margin: 0px 0px 10px; padding: 0px; color: #4c402b; font-family: Arial, Helvetica, simsun, u5b8bu4f53; background-color: #fbf8f4;"> </p><p style="line-height: 25px; margin: 0px 0px 10px; padding: 0px; color: #4c402b; font-family: Arial, Helvetica, simsun, u5b8bu4f53; background-color: #fbf8f4;"><strong><span style="line-height: 28px; font-size: 12pt; font-family: 瀹嬩綋; color: red;">鐗規畩鐢ㄦ硶錛?/span></strong><strong></strong></p><p style="line-height: 25px; margin: 0px 0px 10px; padding: 0px; color: #4c402b; font-family: Arial, Helvetica, simsun, u5b8bu4f53; background-color: #fbf8f4;"> </p><p style="line-height: 25px; margin: 0px 0px 10px; padding: 0px; color: #4c402b; font-family: Arial, Helvetica, simsun, u5b8bu4f53; background-color: #fbf8f4;"><span style="line-height: 28px; font-size: 12pt; color: red;">select   id, name from users where instr('101914, 104703', id) > 0; <br />  </span><span style="line-height: 28px; font-size: 12pt; font-family: 瀹嬩綋; color: red;">瀹冪瓑浠蜂簬</span><span style="line-height: 28px; font-size: 12pt; color: red;"> <br />select   id, name from users where id = 101914 or id = 104703;</span></p><p style="line-height: 25px; margin: 0px 0px 10px; padding: 0px; color: #4c402b; font-family: Arial, Helvetica, simsun, u5b8bu4f53; background-color: #fbf8f4;"> </p><p style="line-height: 25px; margin: 0px 0px 10px; padding: 0px; color: #4c402b; font-family: Arial, Helvetica, simsun, u5b8bu4f53; background-color: #fbf8f4;"> </p><p style="line-height: 25px; margin: 0px 0px 10px; padding: 0px; color: #4c402b; font-family: Arial, Helvetica, simsun, u5b8bu4f53; background-color: #fbf8f4;"> </p><p align="left" style="line-height: 22px; margin: 0px 0px 10px; padding: 0px; color: #4c402b; font-family: Arial, Helvetica, simsun, u5b8bu4f53; background-color: white; word-break: break-all;"><span style="line-height: 25px;"><a rel="nofollow" href="http://www.tkk7.com/heyang/archive/2011/07/17/354478.html" style="color: #863417; text-decoration: initial;"><strong><span style="line-height: 24px; font-size: 11pt; font-family: 瀹嬩綋; color: #646464;"><span style="line-height: 27px;">浣跨敤</span></span></strong><strong><span verdana","sans-serif";="" color:#646464;"="" style="line-height: 24px; font-size: 11pt;">Oracle</span></strong><strong><span style="line-height: 24px; font-size: 11pt; font-family: 瀹嬩綋; color: #646464;"><span style="line-height: 27px;">鐨?/span></span></strong><strong><span verdana","sans-serif";="" color:#646464;"="" style="line-height: 24px; font-size: 11pt;">instr</span></strong><strong><span style="line-height: 24px; font-size: 11pt; font-family: 瀹嬩綋; color: #646464;"><span style="line-height: 27px;">鍑芥暟涓庣儲寮曢厤鍚堟彁楂樻ā緋婃煡璇㈢殑鏁堢巼</span></span></strong></a></span><strong style="line-height: 25px;"></strong></p><p align="left" style="line-height: 22px; margin: 0px 0px 10px; padding: 0px; color: #4c402b; font-family: Arial, Helvetica, simsun, u5b8bu4f53; background-color: white; word-break: break-all;"><span style="line-height: 19px; font-size: 9pt; font-family: 瀹嬩綋; color: #4b4b4b;">涓鑸潵璇達紝鍦?/span><span verdana","sans-serif";""="" 瀹嬩綋;color:#4b4b4b;"="" style="line-height: 19px; font-size: 9pt;">Oracle</span><span style="line-height: 19px; font-size: 9pt; font-family: 瀹嬩綋; color: #4b4b4b;">鏁版嵁搴撲腑錛屾垜浠</span><span verdana","sans-serif";""="" 瀹嬩綋;color:#4b4b4b;"="" style="line-height: 19px; font-size: 9pt;">tb</span><span style="line-height: 19px; font-size: 9pt; font-family: 瀹嬩綋; color: #4b4b4b;">琛ㄧ殑</span><span verdana","sans-serif";""="" 瀹嬩綋;color:#4b4b4b;"="" style="line-height: 19px; font-size: 9pt;">name</span><span style="line-height: 19px; font-size: 9pt; font-family: 瀹嬩綋; color: #4b4b4b;">瀛楁榪涜妯$硦鏌ヨ浼氶噰鐢ㄤ笅闈袱縐嶆柟寮忥細</span><span verdana","sans-serif";="" color:#4b4b4b;""="" 0pt;"="" style="line-height: 19px; font-size: 9pt;"><br style="line-height: 21px;" />1.select * from tb where name like '%XX%';<br style="line-height: 21px;" />2.select * from tb where instr(name,'XX')>0;<br style="line-height: 21px;" /><br style="line-height: 21px;" /></span><span style="line-height: 19px; font-size: 9pt; font-family: 瀹嬩綋; color: #4b4b4b;">鑻ユ槸鍦?/span><span verdana","sans-serif";""="" 瀹嬩綋;color:#4b4b4b;"="" style="line-height: 19px; font-size: 9pt;">name</span><span style="line-height: 19px; font-size: 9pt; font-family: 瀹嬩綋; color: #4b4b4b;">瀛楁涓婃病鏈夊姞绱㈠紩錛屼袱鑰呮晥鐜囧樊涓嶅錛屽熀鏈病鏈夊尯鍒?/span><span verdana","sans-serif";="" color:#4b4b4b;""="" 0pt;"="" style="line-height: 19px; font-size: 9pt;"><br style="line-height: 21px;" /><br style="line-height: 21px;" /></span><span style="line-height: 19px; font-size: 9pt; font-family: 瀹嬩綋; color: #4b4b4b;">涓烘彁楂樻晥鐜囷紝鎴戜滑鍦?/span><span verdana","sans-serif";""="" 瀹嬩綋;color:#4b4b4b;"="" style="line-height: 19px; font-size: 9pt;">name</span><span style="line-height: 19px; font-size: 9pt; font-family: 瀹嬩綋; color: #4b4b4b;">瀛楁涓婂彲浠ュ姞涓婇潪鍞竴鎬х儲寮曪細</span><span verdana","sans-serif";""="" 瀹嬩綋;color:#4b4b4b;"="" style="line-height: 19px; font-size: 9pt;"><br style="line-height: 21px;" />create index idx_tb_name on tb(name);<br style="line-height: 21px;" /><br style="line-height: 21px;" /></span><span style="line-height: 19px; font-size: 9pt; font-family: 瀹嬩綋; color: #4b4b4b;">榪欐牱錛屽啀浣跨敤</span><span verdana","sans-serif";""="" 瀹嬩綋;color:#4b4b4b;"="" style="line-height: 19px; font-size: 9pt;"></span></p><p align="left" style="line-height: 22px; margin: 0px 0px 10px; padding: 0px; color: #4c402b; font-family: Arial, Helvetica, simsun, u5b8bu4f53; background-color: white; word-break: break-all;"><span verdana","sans-serif";="" color:#4b4b4b;""="" 0pt;"="" style="line-height: 19px; font-size: 9pt;">select * from tb where instr(name,'XX')>0;</span></p><p style="line-height: 25px; margin: 0px 0px 10px; padding: 0px; color: #4c402b; font-family: Arial, Helvetica, simsun, u5b8bu4f53; background-color: #fbf8f4;"><span style="line-height: 21px; font-size: 9pt; font-family: 瀹嬩綋; color: #4b4b4b;">榪欐牱鐨勮鍙ユ煡璇紝鏁堢巼鍙互鎻愰珮涓嶅皯錛岃〃鏁版嵁閲忚秺澶ф椂涓よ呭樊鍒秺澶с備絾涔熻欏懼強鍒?/span><span verdana","sans-serif";="" color:#4b4b4b;""="" 0pt;"="" style="line-height: 21px; font-size: 9pt;">name</span><span style="line-height: 21px; font-size: 9pt; font-family: 瀹嬩綋; color: #4b4b4b;">瀛楁鍔犱笂绱㈠紩鍚?/span><span verdana","sans-serif";""="" 瀹嬩綋;color:#4b4b4b;"="" style="line-height: 21px; font-size: 9pt;">DML</span><span style="line-height: 21px; font-size: 9pt; font-family: 瀹嬩綋; color: #4b4b4b;">璇彞浼氫嬌绱㈠紩鏁版嵁閲嶆柊鎺掑簭鐨勫獎鍝嶃?/span></p><img src ="http://www.tkk7.com/rabbit/aggbug/394510.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.tkk7.com/rabbit/" target="_blank">Rabbit</a> 2013-01-21 15:51 <a href="http://www.tkk7.com/rabbit/archive/2013/01/21/394510.html#Feedback" target="_blank" style="text-decoration:none;">鍙戣〃璇勮</a></div>]]></description></item></channel></rss> <footer> <div class="friendship-link"> <p>感谢您访问我们的网站,您可能还对以下资源感兴趣:</p> <a href="http://www.tkk7.com/" title="亚洲av成人片在线观看">亚洲av成人片在线观看</a> <div class="friend-links"> </div> </div> </footer> 主站蜘蛛池模板: <a href="http://www-c559.com" target="_blank">亚洲色大成网站www永久男同</a>| <a href="http://dszb0099.com" target="_blank">亚洲国产高清在线</a>| <a href="http://jxxitutu.com" target="_blank">国产无遮挡裸体免费视频在线观看</a>| <a href="http://jiggybaby.com" target="_blank">xvideos亚洲永久网址</a>| <a href="http://yinyinai155.com" target="_blank">日韩电影免费观看</a>| <a href="http://pecbj.com" target="_blank">亚洲av日韩av永久无码电影</a>| <a href="http://4922000.com" target="_blank">亚洲成AV人片在线播放无码</a>| <a href="http://sdhgjscl.com" target="_blank">一级毛片免费观看</a>| <a href="http://ttvv55.com" target="_blank">在线精品自拍亚洲第一区</a>| <a href="http://www-34595.com" target="_blank">亚洲日韩图片专区第1页</a>| <a href="http://bobostrong31.com" target="_blank">免费一级特黄特色大片在线观看</a>| <a href="http://www91v.com" target="_blank">福利片免费一区二区三区</a>| <a href="http://jjwgzx.com" target="_blank">亚洲国产成人精品不卡青青草原</a>| <a href="http://www-79983.com" target="_blank">国产福利免费在线观看</a>| <a href="http://wwwdd312.com" target="_blank">a免费毛片在线播放</a>| <a href="http://eddiekidd.com" target="_blank">国产精品高清视亚洲精品</a>| <a href="http://njjngs.com" target="_blank">亚洲精品无码久久久久sm</a>| <a href="http://sczssc.com" target="_blank">亚洲视频在线观看免费</a>| <a href="http://12345ww.com" target="_blank">男女猛烈无遮掩视频免费软件 </a>| <a href="http://0415ss.com" target="_blank">无码人妻精品中文字幕免费东京热</a>| <a href="http://6ork.com" target="_blank">香蕉视频在线观看亚洲</a>| <a href="http://hbwhgd.com" target="_blank">国产免费爽爽视频免费可以看</a>| <a href="http://zgjzysfc.com" target="_blank">一个人看的hd免费视频</a>| <a href="http://www-36664.com" target="_blank">亚洲三级在线观看</a>| <a href="http://htsp777.com" target="_blank">亚洲情侣偷拍精品</a>| <a href="http://48eh.com" target="_blank">久久久久久影院久久久久免费精品国产小说</a>| <a href="http://szgreater.com" target="_blank">亚洲精品久久无码</a>| <a href="http://lfpfjc.com" target="_blank">亚洲精品无码国产</a>| <a href="http://hbwhgd.com" target="_blank">亚洲国产成人精品久久久国产成人一区二区三区综 </a>| <a href="http://c7372.com" target="_blank">亚洲av无码片区一区二区三区</a>| <a href="http://jjesqc.com" target="_blank">国内精品免费视频自在线</a>| <a href="http://czshenyue.com" target="_blank">免费看黄网站在线看 </a>| <a href="http://cztbm.com" target="_blank">黄色a三级三级三级免费看</a>| <a href="http://zjjtejia.com" target="_blank">亚洲线精品一区二区三区影音先锋 </a>| <a href="http://szclinic.com" target="_blank">国产免费变态视频网址网站</a>| <a href="http://www55nana.com" target="_blank">国产黄色免费网站</a>| <a href="http://scycho.com" target="_blank">精品无码AV无码免费专区</a>| <a href="http://tianmao920.com" target="_blank">亚洲精品无码不卡在线播放</a>| <a href="http://96j6.com" target="_blank">国产亚洲色婷婷久久99精品91</a>| <a href="http://sanyoumiaomu.com" target="_blank">国产精品深夜福利免费观看</a>| <a href="http://kutuwo.com" target="_blank">女人18毛片水真多免费看</a>| <script> (function(){ var bp = document.createElement('script'); var curProtocol = window.location.protocol.split(':')[0]; if (curProtocol === 'https') { bp.src = 'https://zz.bdstatic.com/linksubmit/push.js'; } else { bp.src = 'http://push.zhanzhang.baidu.com/push.js'; } var s = document.getElementsByTagName("script")[0]; s.parentNode.insertBefore(bp, s); })(); </script> </body>