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

MYSQL µÄ MyISAM ºÍ InnoDB µÄÀ§»ó

½ñÌìÓÃJPAÉú³ÉÊý¾Ý±í£¬ËäÈ»ÔÚEntityÉÏÒѾ­ÅäÖúÃÁËÒ»¶Ô¶àºÍ¶à¶ÔÒ»µÄ¹Øϵ£¬×ÜÊÇÆæ¹Ö²»ÄÜÉú³ÉÍâ¼üË÷Òý¡£
ºóÀ´·¢ÏÖÊÇMySQLµÄ storage engine µÄÎÊÌâ¡£
ĬÈϵÄMyISAMÊDz»Ö§³ÖÍâ¼üµÄ¡£
Ö»ÓÐ¸Ä³É InnoDB²ÅÖ§³ÖÍâ¼ü
Ð޸ķ½·¨£¬ÕÒµ½ my.ini
ÔÚÀïÃæÌí¼Ó»òÐ޸ģ¨Èç¹ûÓеĻ°£©
default-storage-engine = InnoDB
¸½£º
MyISAMºÍInnoDBµÄÇø±ð
 
´æ´¢ÒýÇæ¸÷×ÔµÄһЩÌصã
ÉÏÃæÌáµ½µÄËÄÖÖ´æ´¢ÒýÇ涼Óи÷×ÔÊÊÓõĻ·¾³£¬ÕâÈ¡¾öÓÚËüÃǶÀÓеÄһЩÌØÕ÷¡£Ö÷ÒªÌåÏÖÔÚÐÔÄÜ¡¢ÊÂÎñ¡¢²¢·¢¿ØÖÆ¡¢²ÎÕÕÍêÕûÐÔ¡¢»º´æ¡¢ ¹ÊÕϻָ´£¬±¸·Ý¼°»Ø´æµÈ¼¸¸ö·½Ãæ
Ä¿Ç°±È½ÏÆÕ¼°µÄ´æ´¢ÒýÇæÊÇMyISAMºÍInnoDB.¶øMyISAMÓÖÊǾø´ó²¿·ÖWebÓ¦ÓõÄÊ×Ñ¡¡£MyISAMÓëInnoDBµÄÖ÷ÒªµÄ²»Í¬µãÔÚÓÚÐÔÄܺÍÊÂÎñ¿ØÖÆÉÏ¡£
MyISAMÊÇÔçÆÚISAM(Indexed Sequential Access Method,ÎÒÏÖÔÚÓõÄMySQL5.0ÒѾ­²»Ö§³ÖISAMÁË£©µÄÀ©Õ¹ÊµÏÖ£¬ISAM±»Éè¼ÆΪÊʺϴ¦Àí¶ÁƵÂÊÔ¶´óÓÚдƵÂÊÕâÑùÒ»ÖÖÇé¿ö£¬Òò´ËISAMÒÔ¼°ºóÀ´µÄMyISAM¶¼Ã»Óп¼ÂǶÔÊÂÎïµÄÖ§³Ö£¬ÅųýÁËTPM£¬²»ÐèÒªÊÂÎñ¼Ç¼£¬ISAMµÄ²éѯЧÂÊÏ൱¿É¹Û£¬¶øÇÒÄÚ´æÕ¼ÓúÜÉÙ¡£MyISAMÔڼ̳ÐÁËÕâÀàÓŵãµÄͬʱ£¬Óëʱ¾ã½øµÄÌṩÁË´óÁ¿ÊµÓõÄÐÂÌØÐÔºÍÏà¹Ø¹¤¾ß¡£ÀýÈ翼Âǵ½²¢·¢¿ØÖÆ£¬ÌṩÁË±í¼¶Ëø£¬ËäÈ»MyISAM±¾Éí²»Ö§³ÖÈÝ´í£¬µ«¿ÉÒÔͨ¹ýmyisamchk½øÐйÊÕϻָ´¡£¶øÇÒÓÉÓÚMyISAMÊÇÿÕűíʹÓø÷×Ô¶ÀÁ¢µÄ´æ´¢Îļþ£¨MYDÊý¾ÝÎļþºÍMYIË÷ÒýÎļþ£©£¬Ê¹µÃ±¸·Ý¼°»Ö¸´Ê®·Ö·½±ã£¨¿½±´¸²¸Ç¼´¿É£©£¬¶øÇÒ»¹Ö§³ÖÔÚÏ߻ָ´¡£
ËùÒÔÈç¹ûÄãµÄÓ¦ÓÃÊDz»ÐèÒªÊÂÎñ£¬´¦ÀíµÄÖ»ÊÇ»ù±¾µÄCRUD²Ù×÷£¬ÄÇôMyISAMÊDz»¶þÑ¡Ôñ
InnoDB±»Éè¼Æ³ÉÊÊÓÃÓڸ߲¢·¢¶ÁдµÄÇé¿ö.ʹÓÃMVCC(Multi-Version Concurrency Control)ÒÔ¼°Ðм¶ËøÀ´Ìṩ×ñ´ÓACIDµÄÊÂÎñÖ§³Ö¡£InnoDBÖ§³ÖÍâ¼ü²ÎÕÕÍêÕûÐÔ£¬¾ß±¸¹ÊÕϻָ´ÄÜÁ¦¡£ÁíÍâ InnoDBµÄÐÔÄÜÆäʵ»¹ÊDz»´íµÄ£¬ÌرðÊÇÔÚ´¦Àí´óÊý¾ÝÁ¿µÄÇé¿öÏÂ,Óùٷ½µÄ»°Ëµ¾ÍÊÇ£º InnoDBµÄCPUЧÂÊÊÇÆäËû»ùÓÚ´ÅÅ̵ĹØϵÊý¾Ý¿â´æ´¢ÒýÇæËù²»Äܱȵġ£²»¹ýInnoDBµÄ±¸·Ý»Ö¸´ÒªÂé·³Ò»µã£¬³ý·ÇÄãʹÓÃÁË4.1ÒÔºó°æ±¾ÌṩµÄMulit-tablespaceÖ§³Ö£¬ÒòΪInnoDBºÍMyISAM²»Í¬£¬ËûµÄÊý¾ÝÎļþ²¢²»ÊǶÀÁ¢¶ÔÓ¦ÓÚÿÕűíµÄ¡£¶øÊÇʹÓõĹ²Ïí±í¿Õ¼ä£¬¼òµ¥µÄ¿½±´¸²¸Ç·½·¨¶ÔËû²»ÊÊÓ㬱ØÐëÔÚÍ£µôMYSQLºó¶Ô½øÐÐÊý¾Ý»Ö¸´¡£Ê¹ÓÃPer-Table Tablespacesd£¬Ê¹ÆäÿÕűí¶ÔÓ¦Ò»¸ö¶ÀÁ¢µÄ±í¿Õ¼äÎļþ£¬ÔòÇé¿öÒª¼òµ¥ºÜ¶à¡£
Ò»°ãÀ´Ëµ£¬Èç¹ûÐèÒªÊÂÎñÖ§³Ö£¬²¢ÇÒÓнϸߵIJ¢·¢¶ÁдƵÂÊ£¬InnoDBÊDz»´íµÄÑ¡Ôñ¡£ÒªÊDz¢·¢¶ÁдƵÂʲ»¸ßµÄ»°£¬Æäʵ¿ÉÒÔ¿¼


Ïà¹ØÎĵµ£º

½«ÈÕÖ¾ÎļþдÈëMySqLÖÐ

Ê×ÏȽ¨Ò»¸ö¹¤³Ì£¬×¼±¸ºÃÒ»¸ölog4jµÄjar°üºÍÁ¬½ÓMySqLµÄÇý¶¯°ü¡£ÅäÖÃÈçÏ£º
ÐÞ¸Älog4j.propertiesÎļþ£º
######## #´Ë¾äΪ¶¨ÒåÃûΪstdoutµÄÊä³ö¶ËÊÇÄÄÖÖÀàÐÍ£¬¿ÉÒÔÊÇ
#org.apache.log4j.ConsoleAppender£¨¿ØÖÆ̨£©£¬
#org.apache.log4j.FileAppender£¨Îļþ£©£¬
#org.apache.log4j.DailyRollingFileAppender£¨Ã¿Ìì²úÉúÒ» ......

ÈçºÎÌá¸ßmysql load data infileµÄËÙ¶È


°æȨÉùÃ÷
£º×ªÔØʱÇëÒÔ³¬Á´½ÓÐÎʽ±êÃ÷ÎÄÕÂԭʼ³ö´¦ºÍ×÷ÕßÐÅÏ¢¼°±¾ÉùÃ÷
http://bbayou.blogbus.com/logs/37045617.html
²âÊÔÊý¾Ý2.5G£¬¹²ÓÐÊý¾Ý9427567Ìõ¡£ÓõÄmysqlµÄlarge·þÎñÆ÷µÄÅäÖá£
load
Ò»´ÎÐèÒª´ó¸Å10·ÖÖÓ×óÓÒ¡£
½¨µÄ±íÓõÄÊÇMYISAM£¬µ÷ÕûÁ˼¸¸ösessionµÄ²ÎÊýÖµ
SET

SESSION

BULK_INSERT_BUFFER_S ......

ÕûºÏfreeBSDÏÂnginx+php+mysql°²×°·½°¸£¨ports°²×°£©

  ×î½üÒ»Ö±ÔÚÑо¿freeBSDÏÂnginx+php+mysqlµÄ°²×°£¬¿´Á˺ܶàÍøÉϵÄ×ÊÁÏÊÕ»ñ²»Ð¡£¬²»¹ý´ó²¿·Ö¶¼ÊDZàÒë°²×°£¬Ïà¶Ô³õѧÕßÀ´Ëµ±È½Ï¸´ÔÓ£¬²»ÈÝÒ×Àí½â£¬ËùÒÔÎÒÕûºÏÁËһЩports°²×°µÄ×ÊÁÏ£¬¶¼ÊǾ­¹ý×Ô¼ºÑéÖ¤ºóµÄ£¬°²×°³É¹¦Ò²±È½ÏÈÝÒ×Àí½â£¬ÏÂÃæÊÇÁ½Öֳɹ¦µÄ°¸Àý£¬ÆäÖÐÓÐÒ»¸öÊÇApache´úÌænginxµÄ°²×°£¬Ï£Íû¶Ô´ó¼ÒÓÐËù°ïÖú¡£
° ......

MySQL³£ÓÃÃüÁî×ܽá

MySQL³£ÓÃÃüÁî×ܽá
===MySQL»ù´¡====
mysqlÏÂÔØ: http://www.mysql.com/
mysqld ³£¹æMySQL·þÎñÆ÷
mysqld-opt ÓÅ»¯mysql·þÎñÆ÷,ÌṩһЩ¹¦ÄÜ¿ÉÒÔÍÚ¾ò¸üºÃµÄ¹¦ÄÜ
mysqld-max ÓëmysqldÒ»Ñù,µ«¿ÉÒÔÖ§³Ö¸üÐÂ,¸ü¾ßʵÑéÐÔÖʵŦÄÜ(¸ü²»Îȶ¨)
++°²×°mysql
²Î¼û×Ô´øµÄINSTALL-SOURCEÎļþ
$ ./configure –prefix=/app/m ......

ÔÚFedora 12Öа²×°Apache2+PHP5+MySQL£¨LAMP£©

1.
Ç°ÑÔ
ÎÒʹÓõÄÖ÷»úÃûΪserver1.example.com
£¬ip
µØÖ·ÊÇ192.168.0.100
¡£ÕâЩÉèÖÿÉÄÜÓëÄãÏëÒªµÄÓÐËù²»Í¬£¬ËùÒÔÄã±ØÐëÔÚÊʵ±µÄµØ·½ÐÞ¸Äһϡ£
2
°²×°MySQL5
ÓÃÏÂÁÐÃüÁî°²×°MySQL
£º
yum install mysql mysql-server
È»ºóÎÒÃÇΪMySQL
´´½¨ÏµÍ³Æô¶¯Á´½Ó£¨ÕâÑùµÄ»°£¬MySQL
¾Í»áËæ×ÅϵͳÆô¶¯¶øÆô¶¯£©£¬²¢Æô¶¯ ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ