Ò׽ؽØͼÈí¼þ¡¢µ¥Îļþ¡¢Ãâ°²×°¡¢´¿ÂÌÉ«¡¢½ö160KB

¡¾×ª¡¿ORACLEÖÐLikeÓëInstrÐÔÄÜ´ó±ÈÆ´

ORACLEÖÐLikeÓëInstrÐÔÄÜ´ó±ÈÆ´
×÷Õߣºµ¤³¼ | ¡¾×ªÔØʱÇëÎñ±ØÒÔ³¬Á´½ÓÐÎʽ±êÃ÷ÎÄÕÂԭʼ³ö´¦ºÍ×÷ÕßÐÅÏ¢¼°±¾ÉùÃ÷¡¿
µØÖ·£ºhttp://rdc.taobao.com/blog/dba/html/246_like_instr_performance.html
t±íÖн«½üÓÐ1100ÍòÊý¾Ý£¬ºÜ¶àʱºò£¬ÎÒÃÇÒª½øÐÐ×Ö·û´®Æ¥Å䣬ÔÚSQLÓï¾äÖУ¬ÎÒÃÇͨ³£Ê¹ÓÃlikeÀ´´ïµ½ÎÒÃÇËÑË÷µÄÄ¿±ê¡£µ«¾­¹ýʵ¼Ê²âÊÔ·¢ÏÖ£¬likeµÄЧÂÊÓëinstrº¯Êý²î±ðÏ൱´ó¡£ÏÂÃæÊÇһЩ²âÊÔ½á¹û£º
SQL> set timing on
SQL> select count(*) from t where instr(title,’ÊÖ²á’)>0;
COUNT(*)
———-
65881
Elapsed: 00:00:11.04
SQL> select count(*) from t where title like ‘%ÊÖ²á%’;
COUNT(*)
———-
65881
Elapsed: 00:00:31.47
SQL> select count(*) from t where instr(title,’ÊÖ²á’)=0;
COUNT(*)
———-
11554580
Elapsed: 00:00:11.31
SQL> select count(*) from t where title not like ‘%ÊÖ²á%’;
COUNT(*)
———-
11554580
ÁíÍ⣬ÎÒÔÚÁíÍâÒ»¸ö2ÒÚ¶àµÄ±í£¬Ê¹ÓÃ8¸ö²¢ÐУ¬Ê¹ÓÃlike²éѯºÜ¾Ã¶¼²»³öÀ´½á¹û£¬µ«Ê¹ÓÃinstr,4·ÖÖÓ¼´Íê³É²éÕÒ£¬ÐÔÄÜÊÇÏ൱µÄºÃ¡£ÕâЩС¼¼ÇÉÓú㬹¤×÷ЧÂÊÌá¸ß²»ÉÙ¡£Í¨¹ýÉÏÃæµÄ²âÊÔ˵Ã÷£¬ORACLEÄÚ½¨µÄһЩº¯Êý£¬ÊǾ­¹ýÏ൱³Ì¶ÈµÄÓÅ»¯µÄ¡£


Ïà¹ØÎĵµ£º

ORACLE±¸·Ý²ßÂÔ(ORACLE BACKUP STRATEGY)

ORACLE±¸·Ý²ßÂÔ(ORACLE BACKUP STRATEGY)
2007Äê11ÔÂ02ÈÕ ÐÇÆÚÎå 16:03
¸ÅÒª
1¡¢Á˽âʲôÊDZ¸·Ý
2¡¢Á˽ⱸ·ÝµÄÖØÒªÐÔ
3¡¢Àí½âÊý¾Ý¿âµÄÁ½ÖÖÔËÐз½Ê½
4¡¢Àí½â²»Í¬µÄ±¸·Ý·½Ê½¼°ÆäÇø±ð
5¡¢Á˽âÕýÈ·µÄ±¸·Ý²ßÂÔ¼°ÆäºÃ´¦
  
Ò»¡¢Á˽ⱸ·ÝµÄÖØÒªÐÔ
¿ÉÒÔ˵£¬´Ó¼ÆËã»úϵͳ³öÊÀµÄÄÇÌìÆ𣬾ÍÓÐÁ˱¸·ÝÕâ¸ö¸ÅÄ ......

oracle Òƶ¯¸ßˮλ£º

²é¿´±íµÄ´óС£»
select a.blocks,a.bytes,a.bytes/1024/1024 from user_segments a
where a.segment_name='B_M_DZYH_CUST_SIGN_FACT';
Ê×ÏÈ
create table TEST_1228 as select * from user_tables;
insert into TEST_1228  select * from TEST_1228 ;
insert into TEST_1228  select * from TEST_1228 ;
i ......

Oracle 11g ÐÂÌØÐÔ¼ò½é

 
Oracle 11gÓÚ2007Äê7ÔÂ11ÈÕÃÀ¹ú¶«²¿Ê±¼ä11ʱ£¨±±¾©Ê±¼ä11ÈÕ22ʱ£©Õýʽ·¢²¼£¬11gÊǼ׹ÇÎĹ«Ë¾30ÄêÀ´·¢²¼µÄ×îÖØÒªµÄÊý¾Ý¿â°æ±¾£¬¸ù¾ÝÓû§µÄÐèÇóʵÏÖÁËÐÅÏ¢ÉúÃüÖÜÆÚ¹ÜÀí£¨Information Lifecycle Management£©µÈ¶àÏС£ 
 
Ò»£®ÐÂÌØÐÔÌá¸Ù
 
1.Êý¾Ý¿â¹ÜÀí²¿·Ö
¡ôÊý¾Ý¿âÖØÑÝ(Database Replay)&nb ......

oracle %type

1¡¢Ê¹ÓÃ%TYPE
ÔÚÐí¶àÇé¿öÏ£¬PL/SQL±äÁ¿¿ÉÒÔÓÃÀ´´æ´¢ÔÚÊý¾Ý¿â±íÖеÄÊý¾Ý¡£ÔÚÕâÖÖÇé¿öÏ£¬±äÁ¿Ó¦¸ÃÓµÓÐÓë±íÁÐÏàͬµÄÀàÐÍ¡£ÀýÈ磬students±íµÄfirst_nameÁеÄÀàÐÍΪVARCHAR2(20),ÎÒÃÇ¿ÉÒÔ°´ÕÕÏÂÊö·½Ê½ÉùÃ÷Ò»¸ö±äÁ¿
DECLARE
v_FirstName VARCHAR2(20);
µ«ÊÇÈç¹ûfirst_nameÁеĶ¨Òå¸Ä±äÁ˻ᷢÉúʲô£¨±ÈÈç˵±í¸Ä±äÁË£¬first ......

OracleÅàѵ֮Âà ÉÇÍ·

Õâ´ÎÈ¥ÉÇÍ·ÊǸøÉÇÍ·µçÐŽ²¿Î,Ö÷½²ORACLEÊý¾Ý¿âÐÔÄÜÓÅ»¯,ΪÆÚ4Ìì.´ÓÂÞºþÆû³µÕ¾³ö·¢,×ßÉîÉǸßËÙ,´óÔ¼4,5¸öÖӾ͵½ÉÇÍ·ÁË.
³ö·¢Ê±ÊÇ°øÍí,³µ×ÓÔÚÉîÉǸßËÙÐнø,ϦÑôÎ÷Ï£¬ÂäÈÕµÄÓà»ÔÕÕÓ³ÔÚ¹«Â·Á½±ßµÄÇðÁê,ɽÌÁÉÏ£¬¿´ÉÏÈ¥ºÜÃÀ¡£ÉîÉǸßËٴ󲿷ÖÊÇÑØן£°¶ÏßòêÑÑ£¬ËùÒÔ£¬ÓÐʱÔÚ³µÉϾÍÄܹ»¿´µ½º££¬ÂäÈÕµÄÓà»ÔÕÕÔÚ´óº£ÉÏ£¬²¨¹âÁÛÁÛ£¬¼ ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ