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

[ÔÓ¼Ç] ÐÂÄêÎïÓï&¹ØÓÚMysqlÒýÇæÐÔÄܲâÊÔ

æµµÄ2009ÖÕÓÚ¹ýÈ¥£¬Ò²ÖÕÓÚ°ÑÈËÉú´óÊÂæÍêÁË£¬»Øµ½Õý³£µÄ¹¤×÷Éú»îÖÐÀ´¡£2010¶ÔÎÒÀ´ËµÓ¦¸ÃÊdzäÂúÐÂÆÚÍûµÄÒ»Ä꣬еÄÆõ»ú¾ÍÔÚÑÛÇ°£¬¼ÓÓÍŬÁ¦°É~
ÁíÍâ×¼±¸12¸öÔÂÖ®ºóÔÙÀ´×ܽáһϽñÄêµÄÖØ´óʼǣ¬ºÇºÇ~
˳±ã¿´µ½Ò»¸öMysqlµÄ²âÊÔÎÄÕ£¬¸Ð¾õ»¹ÂúÓвο¼¼ÛÖµµÄ£¬ÓÚÊǼǼÏÂÀ´ÒÔ±ã²Î¿¼¡£
ÒÔÏÂÊÇÒ»¸öMySQLÖÐMyISAMÒýÇæÓëInnoDBÒýÇæÐÔÄܼòµ¥ÐÔÄܲâÊÔ£º
[Ó²¼þÅäÖÃ]
CPU : AMD2500+ (1.8G)
ÄÚ´æ: 1G/ÏÖ´ú
Ó²ÅÌ: 80G/IDE
[Èí¼þÅäÖÃ]
OS : Windows XP SP2
SE : PHP5.2.1
DB : MySQL5.0.37
ÔÚȱʡÅäÖõÄÇé¿öϽøÐвåÈëÊý¾Ý²âÊÔ£º
[²åÈëÊý¾Ý-1] (innodb_flush_log_at_trx_commit=1)
MyISAM 1W£º3/s
InnoDB 1W£º219/s
MyISAM 10W£º29/s
InnoDB 10W£º2092/s
MyISAM 100W£º287/s
InnoDB 100W£ºÃ»¸Ò²âÊÔ
[²åÈëÊý¾Ý-2] (innodb_flush_log_at_trx_commit=0)
MyISAM 1W£º3/s
InnoDB 1W£º3/s
MyISAM 10W£º30/s
InnoDB 10W£º29/s
MyISAM 100W£º273/s
InnoDB 100W£º423/s
[²åÈëÊý¾Ý3] (innodb_buffer_pool_size=1024M)
InnoDB 1W£º3/s
InnoDB 10W£º33/s
InnoDB 100W£º607/s
[²åÈëÊý¾Ý4] (innodb_buffer_pool_size=256M, innodb_flush_log_at_trx_commit=1, set autocommit=0)
InnoDB 1W£º3/s
InnoDB 10W£º26/s
InnoDB 100W£º379/s
¡¾²âÊÔ½áÂÛ¡¿
¿ÉÒÔ¿´³öÔÚMySQL 5.0ÀïÃ棬MyISAMºÍInnoDB´æ´¢ÒýÇæÐÔÄܲî±ð²¢²»ÊǺܴó£¬Õë¶ÔInnoDBÀ´Ëµ£¬Ó°ÏìÐÔÄܵÄÖ÷ÒªÊÇ innodb_flush_log_at_trx_commit Õâ¸öÑ¡ÏÈç¹ûÉèÖÃΪ1µÄ»°£¬ÄÇôÿ´Î²åÈëÊý¾ÝµÄʱºò¶¼»á×Ô¶¯Ìá½»£¬µ¼ÖÂÐÔÄܼ±¾çϽµ£¬Ó¦¸ÃÊǸúË¢ÐÂÈÕÖ¾ÓйØϵ£¬ÉèÖÃΪ0ЧÂÊÄܹ»¿´µ½Ã÷ÏÔÌáÉý£¬µ±È»£¬Í¬ÑùÄã¿ÉÒÔSQLÖÐÌá½»¡°SET AUTOCOMMIT = 0¡±À´ÉèÖôﵽºÃµÄÐÔÄÜ¡£ÁíÍ⣬»¹Ìý˵ͨ¹ýÉèÖÃinnodb_buffer_pool_sizeÄܹ»ÌáÉýInnoDBµÄÐÔÄÜ£¬µ«ÊÇÎÒ²âÊÔ·¢ÏÖûÓÐÌرðÃ÷ÏÔµÄÌáÉý¡£
»ù±¾ÉÏÎÒÃÇ¿ÉÒÔ¿¼ÂÇʹÓÃInnoDBÀ´Ìæ´úÎÒÃǵÄMyISAMÒýÇæÁË£¬ÒòΪInnoDB×ÔÉíºÜ¶àÁ¼ºÃµÄÌص㣬±ÈÈçÊÂÎñÖ§³Ö¡¢´æ´¢¹ý³Ì¡¢ÊÓͼ¡¢Ðм¶Ëø¶¨µÈµÈ£¬ÔÚ²¢·¢ºÜ¶àµÄÇé¿öÏ£¬ÏàÐÅInnoDBµÄ±íÏֿ϶¨Òª±ÈMyISAMÇ¿ºÜ¶à£¬µ±È»£¬ÏàÓ¦µÄÔÚmy.cnfÖеÄÅäÖÃÒ²ÊDZȽϹؼüµÄ£¬Á¼ºÃµÄÅäÖã¬Äܹ»ÓÐЧµÄ¼ÓËÙÄãµÄÓ¦Óá£
Èç¹û²»ÊǺܸ´ÔÓµÄWebÓ¦Ó㬷ǹؼüÓ¦Ó㬻¹ÊÇ¿ÉÒÔ¼ÌÐø¿¼ÂÇMyISAMµÄ£¬Õâ¸ö¾ßÌåÇé¿ö¿ÉÒÔ×Ô¼ºÕå×á£
¡¾½áÂÛ·ÖÎö¡¿
InnoDBºÍMyISAMÊÇÔÚʹÓÃMySQL×î³£ÓõÄÁ½¸ö±íÀàÐÍ£¬¸÷ÓÐÓÅȱµã£¬ÊÓ¾ßÌåÓ¦Óöø¶¨¡£»ù±¾µÄ²î±ðΪ£ºMyISAMÀàÐͲ»Ö§³ÖÊÂÎñ´¦ÀíµÈ¸ß¼


Ïà¹ØÎĵµ£º

¶¨ÖÆÄãµÄMySQLÃüÁîÐÐ

ÎÒÔڵǼMySQLºóµÄÃüÁîÐÐÊÇÕâ¸öÑù×ӵģº
warmbupt@pchuang:/windows/MyCode/SS$ mysql -u root -ppassw0rd
Welcome to the MySQL monitor.  Commands end with ; or \g.
Your MySQL connection id is 37
Server version: 5.1.37-1ubuntu5.1 (Ubuntu)
Type 'help;' or '\h' for help. Type '\c' to clear the curr ......

MySQL³£ÓÃÖ¸ÁºÏ


¼ÇÁËһЩÓà Windows µÄÃüÁîÐÐÀ´²Ù×÷ MySQL µÄÖ¸Áî¡£
ÕªÒª
Á¬½á MySQL
->mysql -u username -p
username ÊÇÄãµÄÕʺÅÃû³Æ¡£
Ô¶³ÌÁ¬½á
->mysql -h hostname -u username -p
hostname ÊÇ MySQL Ö÷»úµÄÃû³Æ¡£
ÏÔʾȫ²¿µÄÊý¾Ý¿â
SHOW DATABASES;
mysql ÊÇ MySQL ÓÃÀ´´¢´æÕʺźÍȨÏÞµÄÊý¾Ý¿â£¬²»ÄÜɾ³ý¡£
Ñ¡Ôñ ......

½â¾ömysqlÊý¾Ý¿âÖÐÎÄÂÒÂëÎÊÌâ

½â¾öÂÒÂë×îºÃµÄ·½·¨ÊÇÔÚÏîÄ¿Éè¼ÆÖ®³õ£¬Í³Ò»ËùÓеÄ×Ö·û¼¯£¬ÀýÈçÒ³Ãæ¡¢request¶ÔÏóÒÔ¼°Êý¾Ý¿âµÈµÈ¡£
Ò»¡¢ ¼¸ÖÖ³£¼ûµÄÂÒÂëÏÖÏó£º
1¡¢Ò³ÃæÂÒÂë
    µ¥´¿µÄÒ³ÃæÂÒÂëÊǺܺýâ¾öµÄ£¬Ö»ÒªÐÞ¸ÄÍ·²¿ÊʺϵÄ×Ö·û¼¯¼´¿É£¬Èç¹ûÒ³ÃæÖÐÎÄÏÔʾÂÒÂ룬Äã¿ÉÒÔ°Ñ×Ö·û¼¯ÐÞ¸ÄΪ£ºgb2312»ògbk¡£
2¡¢Ò³ÃæÖ®¼ä´«µÝµÄ²ÎÊýÊÇÂÒÂë ......

ÓÅ»¯MYSQLÊý¾Ý¿âµÄ·½·¨

1¡¢Ñ¡È¡×îÊÊÓõÄ×Ö¶ÎÊôÐÔ
¡¡¡¡MySQL¿ÉÒԺܺõÄÖ§³Ö´óÊý¾ÝÁ¿µÄ´æÈ¡£¬µ«ÊÇÒ»°ã˵À´£¬Êý¾Ý¿âÖеıíԽС£¬ÔÚËüÉÏÃæÖ´ÐеIJéѯҲ¾Í»áÔ½¿ì¡£Òò´Ë£¬ÔÚ´´½¨±íµÄʱºò£¬ÎªÁË»ñµÃ¸üºÃµÄÐÔÄÜ£¬ÎÒÃÇ¿ÉÒÔ½«±íÖÐ×ֶεĿí¶ÈÉèµÃ¾¡¿ÉÄÜС¡£ÀýÈ磬ÔÚ¶¨ÒåÓÊÕþ±àÂëÕâ¸ö×Ö¶Îʱ£¬Èç¹û½«ÆäÉèÖÃΪCHAR(255),ÏÔÈ»¸øÊý¾Ý¿âÔö¼ÓÁ˲»±ØÒªµÄ¿Õ¼ä£¬ÉõÖÁʹ ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ