¹ØÓÚSQLÓÅ»¯
˵¾ä´ó·Ï»°£¬ÄǾÍÊÇ“ºÏÀíµÄƽºâ¸÷ÖÖ×ÊÔ´µÄʹÓÃ,ÄÚ´æ,cpu,io µÈµÈ”¡£ÕâÒ²ÊǺÜÓеÀÀíµÄ£¬µ«ÊÇʵ¼Ê¾Í²»ºÃ×öÁË£¬ÈçºÎƽºâÄØ£¿
¾ßÌåµãµÄô£¬Í¨¹ý±È½Ï£¬Ó¦¸ÃÊÇÏìӦʱ¼ä×öΪÖ÷ÒªµÄÆÀÅÐÒòËØÁË¡£µ«ÊÇ¿ÉÄÜÓÉÓÚһЩ²»È·¶¨µÄÒòËØ£¬¿ÉÄÜ»á³öÏÖ£ºÕâ´ÎÅܵĿ죬²»µÈÓÚÏ´ÎÒ²ÅܵĿìÁË¡£
ÄǾÍÒª¸ù¾Ý±íµÄÊý¾ÝÁ¿µÄ±ä»¯£¬È·¶¨Ò»¸ö±È½ÏºÏÀíµÄÖ´Ðмƻ®ÁË£¬Ö÷Òª»¹ÊÇÒª½µµÍÂß¼¶ÁΪµ÷ÓŵÄÄ¿±ê£¬ÆäʵÎïÀí¶ÁÒâÒå²»´ó£¬Ò»¸ösqlÓï¾äµÚÒ»´ÎÖ´ÐÐÎïÀí¶Á¿Ï¶¨ÊǺܴóµÄ£¬µ½Á˵Ú2´ÎÎïÀí¶ÁÒ²Ðí¾ÍºÜСÁË¡£
ij¸ßÈË˵£º
ÔÚÊý¾Ý¿âÕûÌåÉÏÀ´½²£¬ÊÇÒª½µµÍ ÎïÀí¶Á
¶ø¶ÔÓÚµ¥Ìõ sql À´½²£¬ÊÇÒÔÂß¼¶ÁµÄ½µµÍΪ±ê×¼µÄ
µÀÀíºÜ¼òµ¥£¬¶ÔÓÚµ¥ÌõsqlÀ´Ëµ£¬Èç¹û·´¸´ÔËÐУ¬ÎïÀí¶Á¾ö¶¨ÓÚ data buffer µÄ´óС £¬µÚÒ»´ÎÔËÐÐ ºÍ µÚ¶þ´ÎÔËÐÐÒ²ÊDz»Ò»ÑùµÄ¡£
µ«±È½ÏÎȶ¨µÄÊÇ Âß¼¶Á¡£ Èç¹ûÒÔÎïÀí¶ÁΪ±ê×¼£¬ÄÇÄѵÀÎïÀí¶ÁΪ0µÄsql¾ÍÊǺÃsql ÁË£¿Èç¹ûsqlµÄÂß¼¶Á¶¼Á¼ºÃ£¬ÄÇÊý¾Ý¿âÕûÌåµÄÎïÀí¶Á½µÏÂÀ´Ò²ÊǺÜ×ÔÈ»µÄÊÂÇé
¸ßÈËÓÖ˵£º
ÁÙʱ¶ÎÊDz»»áÉú²úredo µÄ
buffer gets ¾Í¿ÉÒÔÀí½âΪ ¶Ô buffer cache ÖÐ buffer µÄ·ÃÎÊ buffer*´Î £¬Ò²¿ÉÒÔ¿´×ö·ÃÎ浀 bufferÊýÁ¿£¬µ±È»¿ÉÄÜ´æÔÚ×ÅÒ»¸öbuffer±»·ÃÎʶà´ÎµÄÇé¿ö
ÖÁÓÚ buffer gets£¬Èç¹û·ÃÎʵĿ鲻ÔÚÄÚ´æÖÐ×ÔÈ»¾Í²úÉúÎïÀí¶Á£¬¿ÉÎïÀí¶Á²¢²»Ó°Ïìbuffer gets ,ÒòΪ¶ÔÊý¾ÝµÄ·ÃÎÊ×îÖÕÊÇÔÚÄÚ´æÖÐÍê³ÉµÄ£¬ËäÈ»¶îÍâµØÓÐÎïÀí¶Á¡£
db block gets ½ö½ö±íʾ ÀàËÆdmlÕâÀà²Ù×÷È¥·ÃÎÊÊý¾Ý¿é£¬dml ²Ù×÷Êý¾Ý×îÖÕÒ²ÊÇÔÚ·ÃÎÊbufferµÄ¹ý³ÌÖÐÍê³ÉµÄ°¡£¬¶ø consistent gets ±íʾÀàËÆ selectÕâÑùµÄ²éѯȥ·ÃÎÊbuffer¡£ ¸üÑϸñÀ´Ëµ£¬ÊǽРcurrent mode and query mode .ÕâÊÇoracleµÄ¶ÁÒ»ÖÂÐÔµÄÌصã¾ö¶¨µÄ
Ïà¹ØÎĵµ£º
1. SQLÓÅ»¯µÄÔÔòÊÇ£º
½«Ò»´Î²Ù×÷ÐèÒª¶ÁÈ¡µÄBLOCKÊý¼õµ½×îµÍ,¼´ÔÚ×î¶ÌµÄʱ¼ä´ïµ½×î´óµÄÊý¾ÝÍÌÍÂÁ¿¡£
µ÷Õû²»Á¼SQLͨ³£¿ÉÒÔ´ÓÒÔϼ¸µãÇÐÈ룺
¼ì²é²»Á¼µÄSQL£¬¿¼ÂÇÆäд·¨ÊÇ·ñ»¹ÓпÉÓÅ»¯ÄÚÈÝ
¼ì²é×Ó²éѯ ¿¼ÂÇSQL×Ó²éѯÊÇ·ñ¿ÉÒÔÓüòµ ......
Ö´ÐÐ˳Ðò:´Ó×óµ½ÓÒ,±äÁ¿ÓÅÏÈ,ÖðÐиüÐÂ
Õª×ÔCSDNµÄÀý×Ó(http://topic.csdn.net/u/20091030/16/7fd75fa6-bdb9-4516-9b27-48aef69703ba.html
http://topic.csdn.net/u/20090904/16/e5dad9c7-fb59-41b9-b28d-e3b71c3e8420.html)
1.±äÁ¿ÓÅÏÈ
create table #t (field1 varchar(10),field2 varchar(10))
insert #t sel ......
Èý¡¢Ç¶Ì×±íµÄʹÓ÷½·¨
1¡¢½«Ç¶Ì×±í¶¨ÒåΪPL/SQLµÄ³ÌÐò¹¹Ôì¿é
TYPE type_name IS TABLE OF element_type[NOT NULL];
ÈçÏÂÀýËùʾ£º
DECLARE
-- Define a nested table of variable length strings.
TYPE card_table IS TABLE OF VARCHAR2(5 CHAR);
-- Declare and initialize a n ......
ÉÏÃæÎÒÃÇÌáµ½µÄÊÇһЩ»ù±¾µÄÌá¸ß²éѯËٶȵÄ×¢ÒâÊÂÏî,µ«ÊÇÔÚ¸ü¶àµÄÇé¿öÏÂ,ÍùÍùÐèÒª·´¸´ÊÔÑé±È½Ï²»Í¬µÄÓï¾äÒԵõ½×î¼Ñ·½°¸¡£×îºÃµÄ·½·¨µ±È»ÊDzâÊÔ£¬¿´ÊµÏÖÏàͬ¹¦ÄܵÄSQLÓï¾äÄĸöÖ´ÐÐʱ¼ä×îÉÙ£¬µ«ÊÇÊý¾Ý¿âÖÐÈç¹ûÊý¾ÝÁ¿ºÜÉÙ£¬ÊDZȽϲ»³öÀ´µÄ£¬Õâʱ¿ÉÒÔÓò鿴ִÐмƻ®£¬¼´£º°ÑʵÏÖÏàͬ¹¦ÄܵĶàÌõSQLÓï¾ä¿¼µ½²éѯ·ÖÎöÆ÷£¬°´ ......
QT DataBase SQL Explorer
1¡¢°²×°MySQLµ½¹Ù·½ÍøÕ¾ÏÂÔØMySQLÊý¾Ý¿â£¬·Ç°²×°°æ£¬Ö±½ÓÔËÐÐmysqld½ø³Ìǰ̨µÄ
2¡¢Ìí¼Óϵͳ»·¾³±äÁ¿£¬Path+=':\mysql\bin'µÄpath£¬ÔÙÔÚ¿ªÊ¼ÔËÐУ¬CMD->mysql -uroot µÇ¼µ½mySQLÊý¾Ý¿â
Default passwordûÓеģ¬ÓеĻ° mysql -uroot -pÊäÈëÃÜÂ룻ÍøÂçµÇ¼£ºmysql -h ip ......