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

MySQLѧϰ±Ê¼Ç£ºInnoDBºÍMyISAMµÄ²î±ð


InnoDB
ºÍMyISAM
ÊÇÔÚʹÓÃMySQL
×î³£ÓõÄÁ½¸ö±íÀàÐÍ£¬¸÷ÓÐÓÅȱµã£¬ÊÓ¾ßÌåÓ¦Óöø¶¨¡£»ù±¾µÄ²î±ðΪ£ºMyISAM
ÀàÐͲ»Ö§³ÖÊÂÎñ´¦ÀíµÈ¸ß¼¶´¦Àí£¬¶øInnoDB
ÀàÐÍÖ§³Ö¡£MyISAM
ÀàÐ͵ıíÇ¿µ÷µÄÊÇÐÔÄÜ£¬ÆäÖ´ÐÐÊý¶È±ÈInnoDB
ÀàÐ͸ü¿ì£¬µ«ÊDz»ÌṩÊÂÎñÖ§³Ö£¬¶øInnoDB
ÌṩÊÂÎñÖ§³ÖÒѾ­Íⲿ¼üµÈ¸ß¼¶Êý¾Ý¿â¹¦ÄÜ¡£
MyIASMÊÇIASM±íµÄа汾£¬ÓÐÈçÏÂÀ©Õ¹£º 
¶þ½øÖƲã´ÎµÄ¿ÉÒÆÖ²ÐÔ¡£ 
NULLÁÐË÷Òý¡£ 
¶Ô±ä³¤ÐбÈISAM±íÓиüÉÙµÄËéƬ¡£ 
Ö§³Ö´óÎļþ¡£ 
¸üºÃµÄË÷ÒýѹËõ¡£ 
¸üºÃµÄ¼üÂðͳ¼Æ·Ö²¼¡£ 
¸üºÃºÍ¸ü¿ìµÄauto_increment´¦Àí¡£ 
ÒÔÏÂÊÇһЩϸ½ÚºÍ¾ßÌåʵÏֵIJî±ð£º
1.InnoDB
²»Ö§³ÖFULLTEXTÀàÐ͵ÄË÷Òý¡£
2.InnoDB
Öв»±£´æ±íµÄ¾ßÌåÐÐÊý£¬Ò²¾ÍÊÇ˵£¬Ö´ÐÐselect count(*) from tableʱ£¬InnoDB
ҪɨÃèÒ»±éÕû¸ö±íÀ´¼ÆËãÓжàÉÙÐУ¬µ«ÊÇMyISAM
Ö»Òª¼òµ¥µÄ¶Á³ö±£´æºÃµÄÐÐÊý¼´¿É¡£×¢ÒâµÄÊÇ£¬µ±count(*)Óï¾ä°üº¬ whereÌõ¼þʱ£¬Á½ÖÖ±íµÄ²Ù×÷ÊÇÒ»ÑùµÄ¡£
3.¶ÔÓÚAUTO_INCREMENTÀàÐ͵Ä×ֶΣ¬InnoDB
ÖбØÐë°üº¬Ö»ÓиÃ×ֶεÄË÷Òý£¬µ«ÊÇÔÚMyISAM
±íÖУ¬¿ÉÒÔºÍÆäËû×Ö¶ÎÒ»Æð½¨Á¢ÁªºÏË÷Òý¡£
4.DELETE from tableʱ£¬InnoDB
²»»áÖØн¨Á¢±í£¬¶øÊÇÒ»ÐÐÒ»ÐеÄɾ³ý¡£
5.LOAD TABLE from MASTER²Ù×÷¶ÔInnoDB
ÊDz»Æð×÷Óõģ¬½â¾ö·½·¨ÊÇÊ×ÏÈ°ÑInnoDB
±í¸Ä³ÉMyISAM
±í£¬µ¼ÈëÊý¾ÝºóÔٸijÉInnoDB
±í£¬µ«ÊǶÔÓÚʹÓõĶîÍâµÄInnoDB
ÌØÐÔ£¨ÀýÈçÍâ¼ü£©µÄ±í²»ÊÊÓá£
ÁíÍ⣬InnoDB
±íµÄÐÐËøÒ²²»ÊǾø¶ÔµÄ£¬Èç¹ûÔÚÖ´ÐÐÒ»¸öSQLÓï¾äʱMySQL
²»ÄÜÈ·¶¨ÒªÉ¨ÃèµÄ·¶Î§£¬InnoDB
±íͬÑù»áËøÈ«±í£¬ÀýÈçupdate table set num=1 where name like “%aaa%”
ÈκÎÒ»ÖÖ±í¶¼²»ÊÇÍòÄܵģ¬Ö»ÓÃÇ¡µ±µÄÕë¶ÔÒµÎñÀàÐÍÀ´Ñ¡ÔñºÏÊʵıíÀàÐÍ£¬²ÅÄÜ×î´óµÄ·¢»ÓMySQL
µÄÐÔÄÜÓÅÊÆ¡£
ÎÊ£ºMySQLÖеÄMyISAMÊÇ·ñÖ§³ÖÍâ¼üÔ¼Êø£¿ÎÒ´´½¨ÁËÒ»¸öInnoDBµÄ±í£¬²¢ÉùÃ÷ÁËÍâ¼ü£¬ÏÖÔÚÎÒÏë°ÑËüת»»³ÉMyISAM¡£ÕâÊÇ·ñÊÇ¿ÉÐеģ¿Èç¹û¿ÉÒԵĻ°£¬ÎÒ¸ÃÔõô×öÄØ£¿
 ´ð£ºÍâ¼üÔ¼Êøλ
ÓÚMyISAM
handlerÐÂÔöÌØÐÔµÄto-doÁбíÖУ¬ËüÃÇ»¹Ã»Óб»ÊµÏÖ£¬²¢ÇÒ¿ÉÄÜ»¹Òª³ÖÐøÒ»¶Îʱ¼ä¡£Óë´Ëͬʱ£¬Äú»á·¢ÏÖInnoDBÊÇʵÏÖ´ó¶àÊýÄ¿µÄµÄÒ»ÖÖÁ¼ºÃµÄ
±íhandler¡£µ«ÊÇ£¬Èç¹ûÄúÒ»¶¨Òª½«±íת»»³ÉMyISAM£¬Äú½«»áʧȥִÐÐÍâ¼üµÄÄÜÁ¦¡£ÏëÒª½«±íת»»ÎªÁíÒ»ÖÖhandler£¬Äú¿ÉÒÔʹÓÃÈçÏÂÓï·¨£º
¡¡¡¡ALTER TABLE ±íÃû TYPE= MyISAM;


Ïà¹ØÎĵµ£º

Mysql Explain Ïê½â[Ç¿ÁÒÍƼö]

Mysql Explain Ïê½â
Ò».Óï·¨
explain < table_name >
ÀýÈç: explain select * from t3 where id=3952602;
¶þ.explainÊä³ö½âÊÍ
+----+-------------+-------+-------+-------------------+---------+---------+-------+------+-------+
| id | select_type | table | type  | possible_keys  &nb ......

MySQL 5.5 °æ±¾·¢²¼

½üÈÕ£¬MySQL 5.5 µÚÒ»¸ö°æ±¾·¢²¼ÁË£¬»ùÓÚMySQl 5.4£¬µ«ÊÇÔÚÐÔÄÜÉÏÏà¶ÔÓÚµ±Ç°µÄ5.0/5.1ÓÐÁ˺ܴóµÄÌáÉý¡£
 ÐÂÌØÐÔ£º
Ö§³Ösemisynchronous £¨°ëͬ²½£©¸´Öƽӿڣ¬¿É´î½¨³öÒ»¸öÏà¶ÔÍêÃÀµÄMySQL¸ß¿ÉÓÃÐÔ·½°¸
¼¯³ÉInnodb plugin 1.0.6
Ö§³Ö SQL ±ê×¼ SIGNAL ºÍ RESIGNAL Óï¾ä
ÔöÇ¿XML¹¦ÄÜ£¬Ö§³Ö LOAD XML Óï¾ä
¿Éͨ¹ý A ......

mysqlÐÞ¸ÄÃÜÂë(°üÀ¨ÃÜÂëÍü¼ÇµÄÇé¿ö)

ÐÞ¸ÄrootÃÜÂëµÄʱºò°´ÕÕÍøÉϵÄ˵µÄ¾ÓȻɵɵµÄÖ´ÐÐÁËupdate user set password="asdf" where user="root"£»Ö´ÐÐÖ®ºó·¢ÏÖÃÜÂë´íÁË£¬½øÈ¥²»ÁË£¬ÓÚÊÇÕÛÌÚÁË°ëÌ죬·¢ÏÖmysqlµÄÃÜÂëÊǼÓÃܵIJ»ÊÇÃ÷ÎÄ´æ´¢µÄ£¬ËùÒԸĵÄʱºòÐèÒªÕâÑùset password=password("asdf")¡£´íÎóÒѾ­·¢ÉúÁË£¬ÓÚÊǾͰ´ÕÕÏÂÃæµÄ· ......

mysqlÂÒÂëÎÊÌâ

½â¾öMySqlÊý¾ÝÂÒÂë:
1 д¹ýÂËÆ÷ÉèÖñàÂë¸ñʽ(¸ñʽºÍJSPÒ³ÃæµÄ±àÂëÒ»Ñù)£¬»òÔòÔÚÇëÇóÀïÃæдrequest.setCharacterEncoding("±àÂ뷽ʽ");
2 Èç¹ûÊDzéѯ³öÊý¾ÝÂÒÂ룬ÔÚÁ´½ÓµÄURLÉϼÓÉϱàÂë¸ñʽ(ÄãÕâÀï¼ÓÁË£¬Ã»ÎÊÌâ);
3 ÐÞ¸Ämy.iniÎļþÀïÃæµÄ default-character-set= ÄúÒªµÄ±àÂë¸ñʽ (Ò»¹²ÓÐÁ½´¦£¬Äã²éÕÒһϠ¸ÄΪһÑùµÄ±à ......

ÔÚWindowsÉÏÔËÐÐMySQLµÄ»·¾³¼°ÖµµÃ×¢Òâ

ÔÚWindowsÉÏÔËÐÐMySQLµÄ»·¾³¼°ÖµµÃ×¢Òâ
Ò»¸ö32λWindows²Ù×÷ϵͳ£¬Èç³ð£¬ÎÒ£¬NT£¬2000£¬XP»òWindows Server 2003µÄ¡£
Ó²¼þ»·¾³ÒªÇó²¢²»ÊǺܸßÕâ¾ÍÃâÁË¡£
»ùÓÚWindows NT²Ù×÷ϵͳ£¨ÐĄ̂±Ò£¬2000£¬XP£¬2003Ä꣩£¬ÔÊÐíÄúÔËÐÐ×÷Ϊ·þÎñMySQL·þÎñÆ÷¡£Ò»¸öWindows NTʹÓõIJÙ×÷ϵͳ£¬Ç¿ÁÒ½¨Òé¡£²ÎÔĵÚ2.3.11£¬“Æô¶¯MySQL ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ