OracleÓï¾äÓÅ»¯£µ£³¸ö¹æÔòÏê½â
OracleÓï¾äÓÅ»¯£µ£³¸ö¹æÔòÏê½â(1)
Oracle sql ÐÔÄÜÓÅ»¯µ÷Õû 1. Ñ¡ÓÃÊʺϵÄORACLEÓÅ»¯Æ÷
ORACLEµÄÓÅ»¯Æ÷¹²ÓÐ3ÖÖ£º
a. RULE £¨»ùÓÚ¹æÔò£©
b. COST £¨»ùÓڳɱ¾£©
c. CHOOSE £¨Ñ¡ÔñÐÔ£©
ÉèÖÃȱʡµÄÓÅ»¯Æ÷£¬¿ÉÒÔͨ¹ý¶Ôinit.oraÎļþÖÐOPTIMIZER_MODE²ÎÊýµÄ¸÷ÖÖÉùÃ÷£¬ÈçRULE£¬COST£¬CHOOSE£¬ALL_ROWS£¬FIRST_ROWS . Ä㵱ȻҲÔÚSQL¾ä¼¶»òÊǻỰ£¨session£©¼¶¶ÔÆä½øÐи²¸Ç¡£
ΪÁËʹÓûùÓڳɱ¾µÄÓÅ»¯Æ÷£¨CBO£¬ Cost-Based Optimizer£© £¬ Äã±ØÐë¾³£ÔËÐÐanalyze ÃüÁÒÔÔö¼ÓÊý¾Ý¿âÖеĶÔÏóͳ¼ÆÐÅÏ¢£¨object statistics£©µÄ׼ȷÐÔ¡£
Èç¹ûÊý¾Ý¿âµÄÓÅ»¯Æ÷ģʽÉèÖÃΪѡÔñÐÔ£¨CHOOSE£©£¬ÄÇôʵ¼ÊµÄÓÅ»¯Æ÷ģʽ½«ºÍÊÇ·ñÔËÐйýanalyzeÃüÁîÓйء£ Èç¹ûtableÒѾ±»analyze¹ý£¬ ÓÅ»¯Æ÷ģʽ½«×Ô¶¯³ÉΪCBO £¬ ·´Ö®£¬Êý¾Ý¿â½«²ÉÓÃRULEÐÎʽµÄÓÅ»¯Æ÷¡£
ÔÚȱʡÇé¿öÏ£¬ORACLE²ÉÓÃCHOOSEÓÅ»¯Æ÷£¬ÎªÁ˱ÜÃâÄÇЩ²»±ØÒªµÄÈ«±íɨÃ裨full table scan£© £¬ Äã±ØÐ뾡Á¿±ÜÃâʹÓÃCHOOSEÓÅ»¯Æ÷£¬¶øÖ±½Ó²ÉÓûùÓÚ¹æÔò»òÕß»ùÓڳɱ¾µÄÓÅ»¯Æ÷¡£
2. ·ÃÎÊTableµÄ·½Ê½ORACLE ²ÉÓÃÁ½ÖÖ·ÃÎʱíÖмǼµÄ·½Ê½£º
a. È«±íɨÃè
È«±íɨÃè¾ÍÊÇ˳ÐòµØ·ÃÎʱíÖÐÿÌõ¼Ç¼¡£ ORACLE²ÉÓÃÒ»´Î¶ÁÈë¶à¸öÊý¾Ý¿é£¨database block£©µÄ·½Ê½ÓÅ»¯È«±íɨÃè¡£
b. ͨ¹ýROWID·ÃÎʱí
Äã¿ÉÒÔ²ÉÓûùÓÚROWIDµÄ·ÃÎÊ·½Ê½Çé¿ö£¬Ìá¸ß·ÃÎʱíµÄЧÂÊ£¬ ROWID°üº¬Á˱íÖмǼµÄÎïÀíλÖÃÐÅÏ¢……ORACLE²ÉÓÃË÷Òý£¨INDEX£©ÊµÏÖÁËÊý¾ÝºÍ´æ·ÅÊý¾ÝµÄÎïÀíλÖã¨ROWID£©Ö®¼äµÄÁªÏµ¡£ ͨ³£Ë÷ÒýÌṩÁË¿ìËÙ·ÃÎÊROWIDµÄ·½·¨£¬Òò´ËÄÇЩ»ùÓÚË÷ÒýÁеIJéѯ¾Í¿ÉÒԵõ½ÐÔÄÜÉϵÄÌá¸ß¡£
3. ¹²ÏíSQLÓï¾ä
ΪÁ˲»Öظ´½âÎöÏàͬµÄSQLÓï¾ä£¬ÔÚµÚÒ»´Î½âÎöÖ®ºó£¬ ORACLE½«SQLÓï¾ä´æ·ÅÔÚÄÚ´æÖС£Õâ¿éλÓÚϵͳȫ¾ÖÇøÓòSGA£¨system global area£©µÄ¹²Ïí³Ø£¨shared buffer pool£©ÖеÄÄÚ´æ¿ÉÒÔ±»ËùÓеÄÊý¾Ý¿âÓû§¹²Ïí¡£ Òò´
Ïà¹ØÎĵµ£º
insert into dts_auction_comments (id,auction_id,user_id,user_nick,comments,gmt_create,gmt_modified,status,comm_type)
values(409,127380, ......
½¨Á¢sshÐÅÈΣ¬racµÄ°²×°ÒªÓÃsshºÍscpÀ´¿½±´°²×°Îļþ¡£
ÔÚËùÓеĽڵãÉÏÔËÐУº
mkdir ~/.ssh
chmod 700 ~/.ssh
ssh-keygen -t rsa
ssh-keygen -t dsa
ÔÚrdb1½ÚµãÉÏÖ´ÐУº
ssh rdb1 cat ~/.ssh/id_rsa.pub >> ~/.ssh/authorized_keys
ssh rdb1 cat ~/.ssh/id_dsa.pub >> ~/.ssh/authorized_keys
ssh rdb2 ......
Exam Number/Code : 1Z0-053
Exam Name : Oracle Database 11g: Administration II
Questions and Answers : 167 Q&As
Update Time: 2010-05-15
1. You are not sure if Flashback Database is enabled. What database column and view can you query to
see if the flashback logs are being created in the ......
1¡¢ Í£Ö¹oracleËùÓеķþÎñ£¨¿ªÊ¼--ÔËÐÐ--ÊäÈëservices.msc£©
2¡¢ ɾ³ý×¢²á±íÉϵÄORACLEµÄÓйؼüÖµ(¿ªÊ¼-->ÔËÐÐ-->ÊäÈëregedit£©½«HKEY_LOACAL_MACHINE/SOFTWAREϵÄÖ÷¼üORACLEÈ«²¿É¾³ý¡£
3. ÏÂÃæɾ³ýOracle·þÎñ£º½øÈëHKEY_LOACAL_MACHINE/SYSTEMÖ÷¼üÏ£¬ÔÚControlSet001¡¢ControlSet002¡¢CurrentControlSet--> ......
oracleÖÐʹÓÃon delete cascadeºÍon delete set nullÀ´½¨Á¢Íâ¼ü
ÆäÃæÎÒÃǽéÉÜÁË´´½¨Íâ¼üÔ¼ÊøʱÈç¹ûʹÓÃoracleĬÈϵĴ´½¨·½Ê½£¬ÔÚɾ³ý±»²ÎÕÕµÄÊý¾Ýʱ£¬½«ÎÞ·¨±»É¾³ý£¬ÕâÒ»µãÔÚoracle9iÖиøÁËÎÒÃǸü¶àÁé»îµÄÑ¡Ôñ£¬ÎÒÃÇ¿ÉÊÇʹÓÃon delete cascadeºÍ on delete set null¹Ø¼ü×ÖÀ´¾ö¶¨É¾³ý±»²ÎÕÕÊý¾ÝʱÊÇ·ñÒª½«²ÎÕÕÕâ¸öÊý¾ÝµÄÄÇÐ ......