OracleµÄÓ²½âÎöºÍÈí½âÎö
˵µ½Èí½âÎö£¨soft prase£©ºÍÓ²½âÎö£¨hard prase£©£¬¾Í²»Äܲ»ËµÒ»ÏÂOracle¶ÔsqlµÄ´¦Àí¹ý³Ì¡£µ±Äã·¢³öÒ»ÌõsqlÓï¾ä½»¸¶Oracle£¬ÔÚÖ´ÐкͻñÈ¡½á¹ûÇ°£¬Oracle¶Ô´Ësql½«½øÐм¸¸ö²½ÖèµÄ´¦Àí¹ý³Ì£º
1¡¢Óï·¨¼ì²é£¨syntax check£©
¼ì²é´ËsqlµÄƴдÊÇ·ñÓï·¨¡£
2¡¢ÓïÒå¼ì²é£¨semantic check£©
ÖîÈç¼ì²ésqlÓï¾äÖеķÃÎʶÔÏóÊÇ·ñ´æÔÚ¼°¸ÃÓû§ÊÇ·ñ¾ß±¸ÏàÓ¦µÄȨÏÞ¡£
3¡¢¶ÔsqlÓï¾ä½øÐнâÎö£¨prase£©
ÀûÓÃÄÚ²¿Ëã·¨¶Ôsql½øÐнâÎö£¬Éú³É½âÎöÊ÷£¨parse tree£©¼°Ö´Ðмƻ®£¨execution plan£©¡£
4¡¢Ö´ÐÐsql£¬·µ»Ø½á¹û£¨execute and return£©
ÆäÖУ¬Èí¡¢Ó²½âÎö¾Í·¢ÉúÔÚµÚÈý¸ö¹ý³ÌÀï¡£
OracleÀûÓÃÄÚ²¿µÄhashËã·¨À´È¡µÃ¸ÃsqlµÄhashÖµ£¬È»ºóÔÚlibrary cacheÀï²éÕÒÊÇ·ñ´æÔÚ¸ÃhashÖµ£»
¼ÙÉè´æÔÚ£¬Ôò½«´ËsqlÓëcacheÖеĽøÐбȽϣ»
¼ÙÉè“Ïàͬ”£¬¾Í½«ÀûÓÃÒÑÓеĽâÎöÊ÷ÓëÖ´Ðмƻ®£¬¶øÊ¡ÂÔÁËÓÅ»¯Æ÷µÄÏà¹Ø¹¤×÷¡£ÕâÒ²¾ÍÊÇÈí½âÎöµÄ¹ý³Ì¡£
³ÏÈ»£¬Èç¹ûÉÏÃæµÄ2¸ö¼ÙÉèÖÐÈÎÓÐÒ»¸ö²»³ÉÁ¢£¬ÄÇôÓÅ»¯Æ÷¶¼½«½øÐд´½¨½âÎöÊ÷¡¢Éú³ÉÖ´Ðмƻ®µÄ¶¯×÷¡£Õâ¸ö¹ý³Ì¾Í½ÐÓ²½âÎö¡£
´´½¨½âÎöÊ÷¡¢Éú³ÉÖ´Ðмƻ®¶ÔÓÚsqlµÄÖ´ÐÐÀ´ËµÊÇ¿ªÏú°º¹óµÄ¶¯×÷£¬ËùÒÔ£¬Ó¦µ±¼«Á¦±ÜÃâÓ²½âÎö£¬¾¡Á¿Ê¹ÓÃÈí½âÎö¡£
Õâ¾ÍÊÇÔںܶàÏîÄ¿ÖУ¬³«µ¼¿ª·¢Éè¼ÆÈËÔ±¶Ô¹¦ÄÜÏàͬµÄ´úÂëҪŬÁ¦±£³Ö´úÂëµÄÒ»ÖÂÐÔ£¬ÒÔ¼°ÒªÔÚ³ÌÐòÖжàʹÓð󶨱äÁ¿µÄÔÒò¡£
/****************************************************/
´ó¼Ò¶¼ÔÚ˵ÔÚSqlÖÐʹÓÃÁËBind Var£¨°ó¶¨±äÁ¿£©»áÌá¸ß²»ÉÙÐÔÄÜ£¬ÄÇËûµ½µ×ÊÇÈçºÎÌá¸ßÐÔÄܵÄÄØ£¿
ʹÓÃÁËBind VarÄÜÌá¸ßÐÔÄÜÖ÷ÒªÊÇÒòΪÕâÑù×ö¿ÉÒÔ¾¡Á¿±ÜÃâ²»±ØÒªµÄÓ²·ÖÎö£¨Hard Parse£©¶ø½ÚÔ¼ÁËʱ¼ä£¬Í¬Ê±½ÚÔ¼ÁË´óÁ¿µÄCPU×ÊÔ´¡£
×¢£ºµ±Ò»¸ösqlÓï¾äÌá½»ºó£¬oracle»áÊ×Ïȼì²éһϹ²Ïí»º³å³Ø£¨shared pool£©ÀïÓÐûÓÐÓëÖ®ÍêÈ«ÏàͬµÄÓï¾ä£¬Èç¹ûÓеĻ°Ö»ÐëÖ´ÐÐÈí·ÖÎö¼´¿É£¬·ñÔò¾ÍµÃ½øÐÐÓ²·ÖÎö¡£
¶øΨһʹµÃoracle Äܹ»Öظ´ÀûÓÃÖ´Ðмƻ®µÄ·½·¨¾ÍÊDzÉÓð󶨱äÁ¿¡£°ó¶¨±äÁ¿µÄʵÖʾÍÊÇÓÃÓÚÌæ´úsqlÓï¾äÖеij£Á¿µÄÌæ´ú±äÁ¿¡£°ó¶¨±äÁ¿Äܹ»Ê¹µÃÿ´ÎÌá½»µÄsqlÓï¾ä¶¼ÍêÈ«Ò»Ñù¡£
µ±Ò»¸öClientÌá½»Ò»ÌõSql¸øOracleºó£¬Oracle Ê×ÏÈ»á¶ÔÆä½øÐнâÎö£¨Parse£©£¬È»ºó½«½âÎö½á¹ûÌá½»¸øÓÅ»¯Æ÷£¨Optimiser£©À´½øÐÐÓÅ»¯¶øÈ¡µÃOracleÈÏΪµÄ×îÓŵÄQuery Plan£¬È»ºóÔÙ°´ÕÕÕâ¸ö×îÓŵÄPlanÀ´Ö´ÐÐÕâ¸öSqlÓï¾ä£¨µ±È»ÔÚÕâÖ®ÖÐÈç¹ûÖ»ÐèÒªÈí½âÎöµÄ»°»áÉÙ²¿·Ö²½Ö裩¡£
Ïà¹ØÎĵµ£º
Navicat for xxx ÊÇÒ»¸öÓÅÐãµÄÊý¾Ý¿â¹ÜÀí¿Í»§¶Ë£¬ÓÐ MySQL¡¢Oracle µÈ°æ±¾¡£½¨Òé´ó¼Ò×îºÃÓà Enterprise °æ±¾£¬¹¦ÄÜÈ«ÃæһЩ£¬µ«½ÏÖ®ÓÚÃâ·ÑµÄ Lite °æ£¬ÆóÒµ°æ¿ÉÊÇÒª»¨Òø×ÓÂòµÄ¡£
°²×° Navicat for Oracle ºó£¬Ê×ÏÈÐèÒª½¨Ò»¸ö“Á¬½Ó”£¬×÷Ϊij¸ö¹ÜÀíÈÎÎñµÄ±êʶ£¬ÒòΪ×÷Ϊ¿ ......
Ëæ×ÅÈ«ÇòÐÅÏ¢»¯Ê±´úµÄµ½À´£¬ÐÅÏ¢Êý¾ÝÔ½À´Ô½³ÉΪÆóÒµ¹Ø×¢µÄ½¹µã£¬¼´ÔÚ¸÷ÖÖ×ÔÈ»ÔÖº¦»òÕßÈËΪÆÆ»µµÄÇé¿öÏ£¬ÈçºÎ±£Ö¤Éú²úÊý¾ÝµÄ°²È«ºÍ¹Ø¼üÒµÎñµÄ²»ÖжÏÔËÐС£
´«Í³µÄ±£»¤·½·¨ÀëÏß±¸·Ý¡¢±¸·Ý½éÖÊÒìµØ±£´æÔÚÒ»¶¨³Ì¶ÈÉÏ¿ÉÒÔ½â¾öÉÏÊöÎÊÌ⣬µ«ÎªÁËÄܹ»¶ÔÒµÎñϵͳÌṩ¸ü¸ßµÄʵʱÐԺͿɿ¿ÐÔ£¬±£Ö¤¹Ø¼üÒµÎñ7x24²» ......
°²×°×¼±¸£º
ÏÂÔØÎļþ
l Oracle Database 10g Release 2(10.2.0.1) Software
½âѹÎļþ
½âѹÎļþÃüÁ
unzip 10201_database_linux32.zip
½âѹºóµÄÎļþ¼Ð¿ÉÄÜ“database”»ò“db/Disk1”
HostsÎļþ
ÔÚ/etc/hosts ÎļþÖаüº¬Ò»¸öÍêÕûºÏ· ......
Ë÷Òý×éÖ¯±í£¨IOT£©ÓÐÒ»ÖÖÀàBÊ÷µÄ´æ´¢×éÖ¯·½·¨¡£ÆÕͨµÄ¶Ñ×éÖ¯±íÊÇÒÔÒ»ÖÖÎÞÐòµÄ¼¯ºÏ´æ´¢¡£¶øIOTÖеÄÊý¾ÝÊÇ°´Ö÷¼üÓÐÐòµÄ´æ´¢ÔÚBÊ÷Ë÷Òý½á¹¹ÖС£ÓëÒ»°ãBÊ÷Ë÷Òý²»Í¬µÄµÄÊÇ£¬ÔÚIOTÖÐÿ¸öÒ¶½áµã¼´ÓÐÿÐеÄÖ÷¼üÁÐÖµ£¬ÓÖÓÐÄÇЩ·ÇÖ÷¼üÁÐÖµ¡£
ÈçÏÂͼËùʾ£¬ÔÚIOTËù¶ÔÓ¦µÄBÊ÷½á¹¹ÖУ¬Ã¿¸öË÷ÒýÏî°üÀ¨<Ö÷¼üÁÐÖµ£¬·ÇÖ÷¼üÁÐÖµ>¶ø ......