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

Oracle·ÖÒ³²éѯÓï¾ä


·ÖÒ³²éѯ¸ñʽ£º
SELECT * from 
(
SELECT A.*, ROWNUM RN 
from (SELECT * from TABLE_NAME) A 
WHERE ROWNUM <= 40
)
WHERE RN >= 21
ÆäÖÐ×îÄÚ²ãµÄ²éѯSELECT * from TABLE_NAME±íʾ²»½øÐз­Ò³µÄԭʼ²éѯÓï¾ä¡£ROWNUM <= 40ºÍRN >= 21¿ØÖÆ·ÖÒ³²éѯµÄÿҳµÄ·¶Î§¡£
ÉÏÃæ¸ø³öµÄÕâ¸ö·ÖÒ³²éѯÓï¾ä£¬ÔÚ´ó¶àÊýÇé¿öÓµÓнϸߵÄЧÂÊ¡£·ÖÒ³µÄÄ¿µÄ¾ÍÊÇ¿ØÖÆÊä³ö½á¹û¼¯´óС£¬½«½á¹û¾¡¿ìµÄ·µ»Ø¡£ÔÚÉÏÃæµÄ·ÖÒ³²éѯÓï¾äÖУ¬ÕâÖÖ¿¼ÂÇÖ÷ÒªÌåÏÖÔÚWHERE ROWNUM <= 40Õâ¾äÉÏ¡£
Ñ¡ÔñµÚ21µ½40Ìõ¼Ç¼´æÔÚÁ½ÖÖ·½·¨£¬Ò»ÖÖÊÇÉÏÃæÀý×ÓÖÐչʾµÄÔÚ²éѯµÄµÚ¶þ²ãͨ¹ýROWNUM <= 40À´¿ØÖÆ×î´óÖµ£¬ÔÚ²éѯµÄ×îÍâ²ã¿ØÖÆ×îСֵ¡£¶øÁíÒ»ÖÖ·½Ê½ÊÇÈ¥µô²éѯµÚ¶þ²ãµÄWHERE ROWNUM <= 40Óï¾ä£¬ÔÚ²éѯµÄ×îÍâ²ã¿ØÖÆ·ÖÒ³µÄ×îСֵºÍ×î´óÖµ¡£ÕâÊÇ£¬²éѯÓï¾äÈçÏ£º
SELECT * from 
(
SELECT A.*, ROWNUM RN 
from (SELECT * from TABLE_NAME) A 
)
WHERE RN BETWEEN 21 AND 40
¶Ô±ÈÕâÁ½ÖÖд·¨£¬¾ø´ó¶àÊýµÄÇé¿öÏ£¬µÚÒ»¸ö²éѯµÄЧÂʱȵڶþ¸ö¸ßµÃ¶à¡£
ÕâÊÇÓÉÓÚCBOÓÅ»¯Ä£Ê½Ï£¬Oracle¿ÉÒÔ½«Íâ²ãµÄ²éѯÌõ¼þÍƵ½ÄÚ²ã²éѯÖУ¬ÒÔÌá¸ßÄÚ²ã²éѯµÄÖ´ÐÐЧÂÊ¡£¶ÔÓÚµÚÒ»¸ö²éѯÓï¾ä£¬µÚ¶þ²ãµÄ²éѯÌõ¼þWHERE ROWNUM <= 40¾Í¿ÉÒÔ±»OracleÍÆÈëµ½ÄÚ²ã²éѯÖУ¬ÕâÑùOracle²éѯµÄ½á¹ûÒ»µ©³¬¹ýÁËROWNUMÏÞÖÆÌõ¼þ£¬¾ÍÖÕÖ¹²éѯ½«½á¹û·µ»ØÁË¡£
¶øµÚ¶þ¸ö²éѯÓï¾ä£¬ÓÉÓÚ²éѯÌõ¼þBETWEEN 21 AND 40ÊÇ´æÔÚÓÚ²éѯµÄµÚÈý²ã£¬¶øOracleÎÞ·¨½«µÚÈý²ãµÄ²éѯÌõ¼þÍƵ½×îÄڲ㣨¼´Ê¹ÍƵ½×îÄÚ²ãҲûÓÐÒâÒ壬ÒòΪ×îÄÚ²ã²éѯ²»ÖªµÀRN´ú±íʲô£©¡£Òò´Ë£¬¶ÔÓÚµÚ¶þ¸ö²éѯÓï¾ä£¬Oracle×îÄڲ㷵»Ø¸øÖмä²ãµÄÊÇËùÓÐÂú×ãÌõ¼þµÄÊý¾Ý£¬¶øÖмä²ã·µ»Ø¸ø×îÍâ²ãµÄÒ²ÊÇËùÓÐÊý¾Ý¡£Êý¾ÝµÄ¹ýÂËÔÚ×îÍâ²ãÍê³É£¬ÏÔÈ»Õâ¸öЧÂÊÒª±ÈµÚÒ»¸ö²éѯµÍµÃ¶à¡£
ÉÏÃæ·ÖÎöµÄ²éѯ²»½ö½öÊÇÕë¶Ôµ¥±íµÄ¼òµ¥²éѯ£¬¶ÔÓÚ×îÄÚ²ã²éѯÊǸ´ÔӵĶà±íÁªºÏ²éѯ»ò×îÄÚ²ã²éѯ°üº¬ÅÅÐòµÄÇé¿öÒ»ÑùÓÐЧ¡£
ÕâÀï¾Í²»¶Ô°üº¬ÅÅÐòµÄ²éѯ½øÐÐ˵Ã÷ÁË£¬ÏÂһƪÎÄÕ»áͨ¹ýÀý×ÓÀ´Ïêϸ˵Ã÷¡£ÏÂÃæ¼òµ¥ÌÖÂÛһ϶à±íÁªºÏµÄÇé¿ö¡£¶ÔÓÚ×î³£¼ûµÄµÈÖµ±íÁ¬½Ó²éѯ£¬CBOÒ»°ã¿ÉÄÜ»á²ÉÓÃÁ½ÖÖÁ¬½Ó·½Ê½NESTED LOOPºÍHASH JOIN£¨MERGE JOINЧÂʱÈHASH JOINЧÂʵͣ¬Ò»°ãCBO²»»á¿¼ÂÇ£©¡£ÔÚÕâÀÓÉÓÚʹÓÃÁË·ÖÒ³£¬Òò´ËÖ¸¶¨ÁËÒ»¸ö·µ»ØµÄ×î´ó¼Ç¼Êý£¬NESTED LOOPÔÚ·µ»Ø¼Ç¼Êý³¬¹ý×î´óֵʱ¿ÉÒÔÂíÉÏÍ£Ö¹²¢½«½á¹û·µ»Ø¸øÖмä²ã£¬¶øHASH JOIN±ØÐë´¦ÀíÍêËùÓнá¹û¼¯£


Ïà¹ØÎĵµ£º

OracleË÷ÒýʹÓùæÔò

Ê×ÏÈ£¬ÎÒÃÇҪȷ¶¨Êý¾Ý¿âÔËÐÐÔÚºÎÖÖÓÅ»¯Ä£Ê½Ï£¬ÏàÓ¦µÄ²ÎÊýÊÇ£ºoptimizer_mode¡£¿ÉÔÚsvrmgrlÖÐÔËÐГshow parameter optimizer_mode"À´²é¿´¡£ORACLE V7ÒÔÀ´È±Ê¡µÄÉèÖÃÓ¦ÊÇ"choose"£¬¼´Èç¹û¶ÔÒÑ·ÖÎöµÄ±í²éѯµÄ»°Ñ¡ÔñCBO£¬·ñÔòÑ¡ÔñRBO¡£Èç¹û¸Ã²ÎÊýÉèΪ“rule”£¬Ôò²»ÂÛ±íÊÇ·ñ·ÖÎö¹ý£¬Ò»¸ÅÑ¡ÓÃRBO£¬³ý·ÇÔÚÓï¾äÖÐ ......

Oracle SQLÓëANSI SQLÇø±ð


Oracle SQLÓëANSI SQLÇø±ð
ÏàÐÅ´ó¼Ò¶¼Ê¹ÓùýSQL SERVER¡£½ñÌì¸ø´ó¼Ò¼òµ¥½éÉÜÒ»ÏÂOracle SQLÓëANSI SQLÇø±ð¡£Æäʵ£¬SQL SERVERÓëÓëANSI SQLÒ²ÓÐÇø±ð¡£
1¡¢Ê×ÏÈ´ó¼ÒÒªÃ÷°×ʲôÊÇANSI
ANSI£ºÃÀ¹ú¹ú¼Ò±ê׼ѧ»á£¨American National Standards Institute£©¡£µ±Ê±£¬ÃÀ¹úµÄÐí¶àÆóÒµºÍרҵ¼¼ÊõÍÅÌ壬ÒÑ¿ªÊ¼Á˱ê×¼»¯¹¤×÷£¬µ«Òò±Ë ......

mysql,sqlserver,oracleÈýÖÖÊý¾Ý¿âµÄ´ó¶ÔÏó´æÈ¡


mysql ´ó¶ÔÏó´æÈ¡:
ÀàÐÍÒ»°ãÓ¦¸ÃÓÃmediumblod,
blobÖ»ÄÜ´æ2µÄ16´Î·½¸öbyte,
mediumblodÊÇ24´Î·½,
Ò»°ãÀ´Ëµ¹»ÓÃÁË.longblobÊÇ32´Î·½ÓÐЩ´ó.
MYSQLĬÈÏÅäÖÃÖ»ÄÜ´æ1M´óСµÄÎļþ,ÒªÐÞ¸ÄÅäÖÃ,WIN°æ±¾µÄÔÚmysql.iniÎļþÖÐ
ÐÞ¸Ämax_allowed_packet,net_buffer_lengthµÈ¼¸¸ö²ÎÊý,»òÖ±½ÓSET GLOBAL varName=value.
linux°æ± ......

´ÓOracle¡¢SQLServerÖÐÈ¡µÃ×¢ÊÍ

¸ù¾Ý±í½á¹¹Éú³ÉJavaÎļþµÄ¹¤¾ß£¬ÔÚÈ¡µÃ±íµÄ×Ö¶ÎʱÈçºÎÈ¡µÃ±íµÄ¸÷ÖÖÐÅÏ¢ºÍ×¢ÊÍ£¬¾­¶à·½ËÑÑ°ÕÒµ½ÈçÏÂ×ÊÁϱ¸Ó㺠oracle£º
        user_tab_comments;±í×¢ÊÍ
        user_col_comments;±í×Ö¶Î×¢ÊÍ
        Ò ......

¡¾×ª¡¿ Oracle±í½éÉÜ Ë÷Òý×éÖ¯±í

http://hi.baidu.com/wzbg/blog/item/005f9c098e31a12f6b60fbfb.html
Oracle±í½éÉÜ--Ë÷Òý×éÖ¯±í
2010-01-12 16:03
Ë÷Òý×éÖ¯±í(IOT)²»½ö¿ÉÒÔ´æ´¢Êý¾Ý£¬»¹¿ÉÒԴ洢Ϊ±í½¨Á¢µÄË÷Òý¡£Ë÷Òý×éÖ¯±íµÄÊý¾ÝÊǸù¾ÝÖ÷¼üÅÅÐòºóµÄ˳Ðò½øÐÐÅÅÁеģ¬ÕâÑù¾ÍÌá¸ßÁË·ÃÎʵÄËٶȡ£µ«ÊÇÕâÊÇÓÉÎþÉü²åÈëºÍ¸üÐÂÐÔÄÜΪ´ú¼ÛµÄ(ÿ´ÎдÈëºÍ¸üкó¶¼Òª ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ