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

oracleµÄRBO/CBOÓÅ»¯Æ÷

Ô­ÎĵØÖ·£ºhttp://tech.it168.com/db/o/2006-08-09/200608091935599.shtml        
                                                      oracleµÄRBO/CBOÓÅ»¯Æ÷
OracleµÄÓÅ»¯Æ÷ÓÐÁ½ÖÖÓÅ»¯·½Ê½,¼´»ùÓÚ¹æÔòµÄÓÅ»¯·½Ê½(Rule-Based Optimization£¬¼ò³ÆÎªRBO)ºÍ»ùÓÚ´ú¼ÛµÄÓÅ»¯·½Ê½(Cost-Based Optimization£¬¼ò³ÆÎªCBO)£¬ÔÚOracle8¼°ÒÔºóµÄ°æ±¾,OracleÇ¿ÁÐÍÆ¼öÓÃCBOµÄ·½Ê½
    RBO·½Ê½£ºÓÅ»¯Æ÷ÔÚ·ÖÎöSQLÓï¾äʱ,Ëù×ñÑ­µÄÊÇOracleÄÚ²¿Ô¤¶¨µÄһЩ¹æÔò¡£±ÈÈçÎÒÃdz£¼ûµÄ£¬µ±Ò»¸öwhere×Ó¾äÖеÄÒ»ÁÐÓÐË÷Òýʱȥ×ßË÷Òý¡£
    CBO·½Ê½£ºËüÊÇ¿´Óï¾äµÄ´ú¼Û(Cost),ÕâÀïµÄ´ú¼ÛÖ÷ÒªÖ¸CpuºÍÄÚ´æ¡£ÓÅ»¯Æ÷ÔÚÅжÏÊÇ·ñÓÃÕâÖÖ·½Ê½Ê±,Ö÷Òª²ÎÕÕµÄÊÇ±í¼°Ë÷ÒýµÄͳ¼ÆÐÅÏ¢¡£Í³¼ÆÐÅÏ¢¸ø³ö±íµÄ´óС¡¢ÓÐÉÙÐС¢Ã¿Ðеij¤¶ÈµÈÐÅÏ¢¡£ÕâЩͳ¼ÆÐÅÏ¢Æð³õÔÚ¿âÄÚÊÇûÓеģ¬ÊÇ×öanalyzeºó²Å³öÏֵģ¬ºÜ¶àµÄʱºî¹ýÆÚͳ¼ÆÐÅÏ¢»áÁîÓÅ»¯Æ÷×ö³öÒ»¸ö´íÎóµÄÖ´Ðмƻ®,ÒòЩӦ¼°Ê±¸üÐÂÕâЩÐÅÏ¢¡£
    ×¢Ò⣺×ßË÷Òý²»Ò»¶¨¾ÍÊÇÓŵ쬱ÈÈçÒ»¸ö±íÖ»ÓÐÁ½ÐÐÊý¾Ý£¬Ò»´ÎIO¾Í¿ÉÒÔÍê³ÉÈ«±íµÄ¼ìË÷,¶ø´Ëʱ×ßË÷ÒýʱÔòÐèÒªÁ½´ÎIO,Õâʱȫ±íɨÃè(full table scan)ÊÇ×îºÃ
    ÓÅ»¯Ä£Ê½°üÀ¨Rule¡¢Choose¡¢First rows¡¢All rowsËÄÖÖ·½Ê½£º
    Rule£º»ùÓÚ¹æÔòµÄ·½Ê½¡£
    Choolse£ºÄ¬ÈϵÄÇé¿öÏÂOracleÓõıãÊÇÕâÖÖ·½Ê½¡£Ö¸µÄÊǵ±Ò»¸ö±í»ò»òË÷ÒýÓÐͳ¼ÆÐÅÏ¢£¬Ôò×ßCBOµÄ·½Ê½£¬Èç¹û±í»òË÷Òýûͳ¼ÆÐÅÏ¢£¬±íÓÖ²»ÊÇÌØ±ðµÄС£¬¶øÇÒÏàÓ¦µÄÁÐÓÐË÷Òýʱ£¬ÄÇô¾Í×ßË÷Òý£¬×ßRBOµÄ·½Ê½¡£
    First Rows£ºËüÓëChoose·½Ê½ÊÇÀàËÆµÄ£¬Ëù²»Í¬µÄÊǵ±Ò»¸ö±íÓÐͳ¼ÆÐÅϢʱ£¬Ëü½«ÊÇÒÔ×î¿ìµÄ·½Ê½·µ»Ø²éѯµÄ×îÏȵļ¸ÐУ¬´Ó×ÜÌåÉϼõÉÙÁËÏìӦʱ¼ä¡£
    All Rows:Ò²¾ÍÊÇÎÒÃÇËù˵µÄCostµÄ·½Ê½£¬µ±Ò»¸ö±íÓÐͳ¼ÆÐÅϢʱ£¬Ëü½«ÒÔ×î¿ìµÄ·½Ê½·µ»Ø±íµÄËùÓеÄÐУ¬´Ó×ÜÌåÉÏÌá¸ß²éѯµÄÍÌÍÂÁ¿¡£Ã»ÓÐͳ¼ÆÐÅÏ¢Ôò×ßRBOµÄ·½Ê½¡£
    É趨ѡÓÃÄÄÖÖÓÅ»¯Ä£Ê½£º
    A¡¢Instance¼¶±


Ïà¹ØÎĵµ£º

oracleÔËÐÐÃüÁî´óÈ«

net use \\ip\ipc$ " " /user:" " ½¨Á¢IPC¿ÕÁ´½Ó
net use \\ip\ipc$ "ÃÜÂë" /user:"Óû§Ãû" ½¨Á¢IPC·Ç¿ÕÁ´½Ó
net use h: \\ip\c$ "ÃÜÂë" /user:"Óû§Ãû" Ö±½ÓµÇ½ºóÓ³Éä¶Ô·½C£ºµ½±¾µØÎªH:
net use h: \\ip\c$ µÇ½ºóÓ³Éä¶Ô·½C£ºµ½±¾µØÎªH:
net use \\ip\ipc$ /del ɾ³ýIPCÁ´½Ó
net use h: /del ɾ³ýÓ³Éä¶Ô·½µ½±¾µ ......

¹Ø±ÕÊý¾Ý¿â(Ô®ÒýOracleÁª»úÎĵµ)

Close a Database
When you close a database, Oracle writes all database data and recovery data in the SGA to the datafiles and redo log files, respectively. Next, Oracle closes all online datafiles and redo log files. (Any offline datafiles of any offline tablespaces have been closed already. If you ......

Oracle³£¼û´íÎó——ORA 3113

ǰÑÔ
ÿһ¸öDBAÔÚ½øÐÐÊý¾Ý¿â¹ÜÀíµÄ¹ý³ÌÖв»¿É±ÜÃâµÄÒªÓöµ½ÐÎÐÎɫɫµÄ´íÎó(ORA-1547 ,ORA-904,ORA-1578 ......)¡£ÓÐЩ´íÎóÓÉÓÚÆµ·±³öÏÖ¡¢Ô­Òò¸´ÔÓ¶ø±» Oracle DBA ÃÇÏ·³ÆÖ®Îª"¾­µäµÄ´íÎó"¡£ÆäÖÐORA-3113 "end of file on communication channel" ¾ÍÊÇÕâÑùµÄÒ»¸ö¡£
ÎÒÃÇ¿ÉÒÔ¼òµ¥µÄ°ÑÕâ¸ö´íÎóÀí½âΪOracle¿Í»§¶Ë½ø³ÌºÍÊý¾Ý¿ ......

OracleÓαêʹÓù¥ÂÔ

Sql´úÂë
1.
´ÓÓαêÌáÈ¡Êý¾Ý
2. ´ÓÓαêʧȥһÆðÊý¾ÝÔËÓÃFETCHÏÂÁÿһ´ÎÌáÈ¡Êý¾Ýºó£¬Óα궼ָÏò½á¹û¼¯µÄÏÂÒ»Æð¡£Óï·¨Èç´Î£º
3. FETCH cursor_name INTO variable[,variable,...]
4. ÖÁÓÚSELECT¶¨ÒåµÄÓαêµÄÿһÁУ¬FETCH±äÁ¿ÁÐ±í¶¼Ó¦¸ÃÓÐÒ»¸ö±äÁ¿ÓëÖ®Ïà¶ÔÓ¦£¬±äÁ¿µÄ²¿ÀàÒ²ÒªÀ×ͬ¡£
Àý£º
5. SET SERVERIUTPUT ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØÍ¼ | ¸ÓICP±¸09004571ºÅ