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

²»ÒªÊ¹ÓÃһЩmysqlÌØÓеÄtipÀ´Ð´²éѯ

http://immike.net/blog/2007/04/09/how-not-to-optimize-a-mysql-query/
ÕâƪÎÄÕ½¨Ò飺
£¨1£©²»ÒªÊ¹ÓÃһЩmysqlµÄtip£¬È磺SQL_SMALL_RESULT, HIGH/LOW_PRIORITY, and INSERT DELAYED£¬STRAIGHT_JOIN£¬³ý·ÇûÓÐÆäËû·½·¨£¬ÒòΪÕâÑùʧȥÁËSQLµÄ¿ÉÒÆÖ²ÐÔ
£¨2£©Êʵ±¶Ô±í½øÐÐË÷Òý
£¨3£©±ÜÃâ¶Ô²»±ØÒªÊý¾ÝµÄ²éѯ
£¨4£©´¦Àí×îÂýµÄ10¸ö²éѯ
£¨5£©¸ü¼ÓºÃµÄÀí½âSQL


Ïà¹ØÎĵµ£º

MyEclipse6.6 Á¬½ÓMySQLµÄÊý¾Ý¿âÅäÖÃ

1¡¢´ò¿ªMyEclipse6.6
2¡¢Ñ¡Ôñ²Ëµ¥£ºWindow/Open Perspective/MyEclipse Database Explorer£¬µã»÷OK£¬ÔÚ×ó±ß´ò¿ªDB Brower´°¿Ú¡£
3¡¢ÔÚDB Brower´°¿ÚÄÚÈÎÒâ¿Õ°×´¦»÷ÓÒ¼ü£¬Ñ¡ÔñNewÃüÁµ¯³öDatabase Driver´°¿Ú
4¡¢±¾´°¿Ú¸÷Ïî˵Ã÷£º
   Driver template: MySQL Connector/J   Ñ¡ÔñÇý¶¯Ä£°å
 & ......

mysqlÓÅ»¯¼¼ÇÉ

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

MysqlÓÅ»¯¼¼ÇÉ

×ܽáÁËһЩMySQLÓÅ»¯·½ÃæµÄ¼¼ÇÉ
Ò». Æô¶¯²ÎÊýÓÅ»¯
ÐÞ¸Ä my.cnf (»òÕßmy.ini)£¬¼ÓÈë/ÐÞ¸ÄÒÔϼ¸ÐÐ
#É趨»º´æµÄÁ¬½ÓÊý,½ÚÊ¡Á¬½ÓʱµÄ¿ªÏú
back_log = 64
#½ûÓÃÎļþϵͳÍⲿËø
external-locking = 0
#½ûÓÃBDB,Èç¹ûÄãȷʵ²»ÐèÒªµÄ»°,innodbÒ²ÊÇÈç´Ë
skip-bdb
#Ë÷Òý»º³å,Èç¹ûÊÇרÓõÄÊý¾Ý¿â·þÎñÆ÷,¿ÉÒÔÉèÖøߴï·þÎñÆ÷ÄÚ´ ......

ÕÒ»ØMysQLÃÜÂë

ÓÉÓÚÇ°¶Îʱ¼äÒªÓÃpowerdesignerÉè¼ÆÊý¾Ý¿â£¬¿ÉÊý¾Ý¿âÉè¼ÆºÃºóºÃµ¼ÈëMysQLʱÐèÒªODBCÁ¬½Ó£¬¶øMysQL5.0ÒÔÉϵľùÒªÐÞ¸ÄÃÜÂ루ÎÒÔÚÍøÉϲé¹ý£©£¬°´ËûÃǵÄÒâ˼ÐÞ¸ÄÁËrootÃÜÂ룬½á¹ûÊÇÖ±½Ó½ø²»ÁËMysQLÁË£¬ÎÒÄǸöÓôÃÆ£¬ÔÚÍøÉϲéÕÒ×ÊÁÏ£¬Ò²°´ËûÃǵķ½·¨×öÁË£¬¿É»¹ÊDz»ÐУ¨±¾È˶Ôdos²»Ê죩¡£µ«×îÖÕ»¹ÊÇ¿ÉÒÔÁË£¬ÏÂÃæ˵ϾßÌå·½·¨
1¡¢w ......

tomcat ÅäÖÃmysql Êý¾Ý¿âÁ¬½Ó³Ø

tomcat °²×°Ä¿Â¼ÏµÄconfĿ¼ÖеÄcontext.xmlÓëweb.xmlÎļþ·Ö±ðÐÞ¸ÄÈçÏ£º
context.xml мÓÈçÏÂÄÚÈÝ£º
<Resource name="jdbc/mysql"
auth="Container"
type="javax.sql.DataSource"
driverClassName="com.mysql.jdbc.Driver"
url="jdbc:mysql://Êý¾Ý¿âµØÖ·:3306/Êý¾Ý¿âà ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ